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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章