ubuntu14(python3.7) 安装pip3报错:ImportError: cannot import name 'sysconfig'

解决方案:

1、加上源

sudo vim /etc/apt/sources.list

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、更新

sudo apt-get update

3、安装pip3

sudo apt-get install python3-pip

4、安装distutils

sudo apt-get install python3-distutils

5、再次执行pip3不报错

posted @ 2019-09-14 23:22  linhuang  阅读(7)  评论(0编辑  收藏  举报  来源