install docker-compose 报错cannot import name 'sysconfig'

在使用pip3 install docker-compose 报错如下:

解决方案 :

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

保存后,更新源:

sudo apt-get update

重新安装pip3

sudo apt-get install python3-pip

安装完成后,即可正确安装

docker-compose

猜你喜欢

转载自blog.csdn.net/u012798683/article/details/105688865
今日推荐