Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 456
guagay_wk Avatar asked Oct 01 '17 11:10

guagay_wk


1 Answers

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

then running conda install --force-reinstall pip

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

like image 139
Mahmoud Elagdar Avatar answered Nov 14 '22 23:11

Mahmoud Elagdar