user781486 user781486 - 8 months ago 183
Python Question

pip stopped working after upgrading anaconda v4.4 to v5.0

I ran the command

conda update anaconda
to update anaconda v4.4 to v5.0

After anaconda was successfully upgraded to v5.0, I had problems running
pip
.

This is the error output I see after running
pip
;

Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\Scripts\pip-script.py", line 6, in <module>
from pip import main
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\__init__.py", line 28, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\vcs\mercurial.py", line 9, in <module>
from pip.download import path_to_url
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\download.py", line 41, in <module>
from pip._vendor.requests.adapters import BaseAdapter, HTTPAdapter
ModuleNotFoundError: No module named 'pip._vendor.requests.adapters'


How can I get pip to work again? I am using Windows10, 64-bit python v3.6 anaconda v5.0

Answer Source

Had the same problem fixed by renaming the directory:
%USERPROFILE%\Anaconda3\Lib\site-packages\pip

then running conda install -f pip

(Then I guess it's safe to remove the renamed directory)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download