Environment: Global Environment
Description
When upgraded from 9.0.3 to 18.0, it starts showing the following error constantly on each use of pip-
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
from pip import main
ImportError: cannot import name main
Expected behavior
This should not be happen.
How to Reproduce
Upgrade pip from version 9 to latest as
pip install --upgrade pip
and you are unable to use any features of pip anymore.
pip install scikit-learn
Output
Following traceback:
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
from pip import main
ImportError: cannot import name main
Please see #5599.
Thanks. @pradyunsg
The Ubuntu's python-pip-9.0.1
installed(via apt get python-pip) is conflicting with Latest pip-18.0
provided by pypa. So sudo rm -rf ~/.local/lib/python2.7/site-packages/
(Beware!) removes the ubuntu's python-pip and resolves the problem. _Only one pip can exist on the system_
I couldn't find python-pip in site-packages
I couldn't find python-pip in site-packages
rm -rf ~/.local/lib/python*
Please see #5599, there's a lot of advice presented there.
Most helpful comment
The Ubuntu's
python-pip-9.0.1
installed(via apt get python-pip) is conflicting with Latestpip-18.0
provided by pypa. Sosudo rm -rf ~/.local/lib/python2.7/site-packages/
(Beware!) removes the ubuntu's python-pip and resolves the problem. _Only one pip can exist on the system_