Saya berhasil menginstal python3 dan pip3 di Ubuntu16.04 saya, tetapi instalasi pip3 rusak. Bagaimana saya bisa memperbaiki masalah ini? Informasi kesalahan pip3 install
adalah sebagai berikut:
# pip3 install xlwt
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
from pip import main
File "/usr/lib/python3/dist-packages/pip/__init__.py", line 21, in <module>
from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning
ModuleNotFoundError: No module named 'pip._vendor.requests'
Output dari sudo -H pip3 install --upgrade pip
sudo -H pip3 install --upgrade pip
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
from pip import main
File "/usr/lib/python3/dist-packages/pip/__init__.py", line 21, in <module>
from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning
ModuleNotFoundError: No module named 'pip._vendor.requests'
Output dari which pip3
dan pip3 --version
:
# which pip3
/usr/bin/pip3
# pip3 --version
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
from pip import main
File "/usr/lib/python3/dist-packages/pip/__init__.py", line 21, in <module>
from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning
ModuleNotFoundError: No module named 'pip._vendor.requests'
PS Python2 pip berjalan dengan sukses. Output dari "yang pip" dan "versi pipa -":
# which pip
/usr/bin/pip
# pip --version
pip 1.5.4 from /usr/local/lib/python2.7/dist-packages/pip-1.5.4-py2.7.egg (python 2.7)
Dan informasi pemasangan python dan python3:
# which python
/usr/bin/python
# which python3
/usr/bin/python3
# python -V
Python 2.7.14
# python3 -V
Python 3.6.3