Я успешно установил python3 и pip3 на свою Ubuntu16.04, но установка pip3 не работает. Как я могу решить эту проблему? Информация об ошибке pip3 install
следующая:
# 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'
Выход из 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'
Вывод which pip3
и 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 успешно работает. Выходные данные "which pip" и "pip --version":
# 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)
И информация по установке python и python3:
# which python
/usr/bin/python
# which python3
/usr/bin/python3
# python -V
Python 2.7.14
# python3 -V
Python 3.6.3