美文网首页
ubuntu18.04(python3.6)安装pip3报错:I

ubuntu18.04(python3.6)安装pip3报错:I

作者: moxiaoxiao | 来源:发表于2018-06-14 20:23 被阅读39次

    错误描述:
    启动pip3时报错:
    Traceback (most recent call last):
    File "/usr/bin/pip3", line 9, in <module>
    from pip import main
    File "/usr/lib/python3/dist-packages/pip/init.py", line 14, in <module>
    from pip.utils import get_installed_distributions, get_prog
    File "/usr/lib/python3/dist-packages/pip/utils/init.py", line 23, in <module>
    from pip.locations import (
    File "/usr/lib/python3/dist-packages/pip/locations.py", line 9, in <module>
    from distutils import sysconfig
    ImportError: cannot import name 'sysconfig'

    2.1 添加源(原有基础上)
    deb http://cn.archive.ubuntu.com/ubuntu bionic main multiverse restricted universe
    deb http://cn.archive.ubuntu.com/ubuntu bionic-updates main multiverse restricted universe
    deb http://cn.archive.ubuntu.com/ubuntu bionic-security main multiverse restricted universe
    deb http://cn.archive.ubuntu.com/ubuntu bionic-proposed main multiverse restricted universe

    2.2 安装pip3
    sudo apt-get install python3-pip

    安装distutils,解决报错问题
    sudo apt-get install python3-distutils

    相关文章

      网友评论

          本文标题:ubuntu18.04(python3.6)安装pip3报错:I

          本文链接:https://www.haomeiwen.com/subject/xerueftx.html