升级pip后出错:无法导入名称'main'
每当我尝试使用pip安装任何软件包时,我收到此导入错误:
guru@guru-notebook:~$ pip3 install numpy
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
from pip import main
ImportError: cannot import name 'main'
guru@guru-notebook:~$ cat `which pip3`
#!/usr/bin/python3
# GENERATED BY DEBIAN
import sys
# Run the main entry point, similarly to how setuptools does it, but because
# we didn't install the actual entry point from setup.py, don't use the
# pkg_resources API.
from pip import main
if __name__ == '__main__':
sys.exit(main())
它之前工作正常,我不知道为什么它会抛出这个错误。我搜索了这个错误,但找不到任何解决方法。
如果您需要任何进一步的细节,请告诉我,我会更新我的问题。
holdtom
相关分类