I am working with conda in Windows. I accidentally installed two versions of pip using python -m pip install --upgrade pip
Now when I run conda list
from the base env:
While pip -version
gives pip 10.0.0
If I create a new env with conda create --name py3 pip
and run pip --version
I get an ImportError, however python -m pip --version
works:
How can I resolve this?
First of all I tried to replicate your issue and when I updated pip to 10.0.1 using
python -m pip install --upgrade pip
, the commandpip --version
seems to work for me. I suppose it was a bug on version 10.0.0. Now coming to the issue that multiple pip versions are showing up inconda list
of base, the<pip>
one is the incorrect one and must be removed.You can uninstall one of the pip versions
Now finally run
And violla! Everything is back to normal. Next time, you can update pip by using
It is a safer method to update.
Note:-
In this scenario we have also removed the pip from your python installation as well. If you want to use pip in cmd prompt then simply use
easy_install pip~=10.0.1
in cmd prompt.