0%

pip之No module named 'pip._internal'

前记

说说本地环境Deepin 15.8Python2Python3共存

问题

问题如下:

1
2
3
4
5
$ pip3
Traceback (most recent call last):
File "/usr/local/bin/pip3", line 7, in <module>
from pip._internal import main
ModuleNotFoundError: No module named 'pip._internal'

1
2
3
4
5
$ pip
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'

pippip3均不可使用

解决

1
2
3
4
5
6
7
8
9
10
11
$ sudo easy_install pip
Searching for pip
Best match: pip 10.0.1
Adding pip 10.0.1 to easy-install.pth file
Installing pip script to /usr/local/bin
Installing pip3.6 script to /usr/local/bin
Installing pip3 script to /usr/local/bin

Using /usr/local/lib/python2.7/dist-packages
Processing dependencies for pip
Finished processing dependencies for pip

完美解决

我就想试试,没别的意思!