最近买了阿里云的Ubuntu16.04服务器, 默认是Python3.5, 我通过修改默认为Python3.6, 结果pip就不能用了,一直报错, 如下,
root@iZwz98p61dhjsadfhjkarjhj5Z:~# pip -V
Traceback (most recent call last):
File "/usr/local/bin/pip", line 7, in <module>
from pip._internal import main
ModuleNotFoundError: No module named 'pip._internal'
尝试过很多中方法, 多无效果, 皇天不负有心人, 最终还是解决了,
方法如下, 供参考:
root@iZwz98p61dhjsadfhjkarjhj5Z:~# wget https://bootstrap.pypa.io/get-pip.py --no-check-certificate
root@iZwz98p61dhjsadfhjkarjhj5Z:~# sudo python get-pip.py
执行上述两条命令后解决了
root@iZwz98p61dhjsadfhjkarjhj5Z:~# pip -V
pip 10.0.1 from /usr/local/lib/python3.6/dist-packages/pip (python 3.6)
root@iZwz98p61d8twwl8rrjhj5Z:~#
网友评论