ubuntu18.04(python3.6)安装pip3报错:ImportError: cannot import name 'sysconfig'
生活随笔
收集整理的這篇文章主要介紹了
ubuntu18.04(python3.6)安装pip3报错:ImportError: cannot import name 'sysconfig'
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
啟動pip3時報錯:
Traceback (most recent call last):File "/usr/bin/pip3", line 9, in <module>from pip import mainFile "/usr/lib/python3/dist-packages/pip/__init__.py", line 14, in <module>from pip.utils import get_installed_distributions, get_progFile "/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.解決方案:
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 universe2.2 安裝pip3
sudo apt-get install python3-pip2.3 安裝distutils,解決報錯問題
sudo apt-get install python3-distutils總結
以上是生活随笔為你收集整理的ubuntu18.04(python3.6)安装pip3报错:ImportError: cannot import name 'sysconfig'的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python进阶:switch语句、推导
- 下一篇: python3练习题:1-10