转载:亲测同时也解决了sudo: pip:command not found问题
pip 10.0.0 BUG 解决方案Traceback (most recent call last): File "/usr/bin/pip3", line 9, in
Traceback (most recent call last):
File “/usr/bin/pip3”, line 9, in
from pip import main
或者pip 时也出现这个问题
这是pip 10.0.0版本的BUG
注:现在这个问题好像已经解决了
解决办法
修改 /usr/bin/pip 文件
from pip import main
if __name__ == '__main__':
sys.exit(main())
- 1
- 2
- 3
改为:
from pip import __main__
if __name__ == '__main__':
sys.exit(__main__._main())
- 1
- 2
- 3
- 4
另一种问题
Traceback (most recent call last):
File "/usr/bin/pip3", line 11, in
sys.exit(main())
File "/usr/lib/python3/dist-packages/pip/__init__.py", line 215, in main
locale.setlocale(locale.LC_ALL, '')
File "/usr/lib/python3.5/locale.py", line 594, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
解决方法:
在 Linux 终端输入以下命令,即可
export LC_ALL=C
</div>
<link href="https://csdnimg.cn/release/phoenix/mdeditor/markdown_views-258a4616f7.css" rel="stylesheet">
</div>
</article>