2

Somehow I broke my conda/urllib3 installation (Python 2.7 / Anaconda) but without admin rights to the machine I use have limited options to fix / reinstall everything the whole anaconda.

For any conda operations,(e.g. conda install launcher), I am getting the message:

Traceback (most recent call last):
  File "C:\Anaconda2\Scripts\conda-script.py", line 3, in <module
    import conda.cli
  File "C:\Anaconda2\Lib\site-packages\conda\cli\__init__.py", li
    from .main import main  # NOQA
  File "C:\Anaconda2\Lib\site-packages\conda\cli\main.py", line 4
    from ..base.context import context
  File "C:\Anaconda2\Lib\site-packages\conda\base\context.py", li
    from ..common.url import urlparse, path_to_url
  File "C:\Anaconda2\Lib\site-packages\conda\common\url.py", line
    from requests.packages.urllib3.util.url import parse_url
ImportError: No module named requests.packages.urllib3.util.url

For both conda and urllib3 i have tried a number of combinations using pip, e.g.

pip install urllib3 
pip install urllib3 --upgrade
pip install urllib3 --upgrade --force-reinstall
pip install urllib3==1.7.1 --upgrade --force-reinstall
pip install H:\PyManPkgs\urllib3-1.18-py2.py3-none-any.whl --upgrade

pip install conda
pip install conda --upgrade --force-reinstall

etc. All of these installs work fine, but the same conda/urllib3 issue persists.

thanks

dreab
  • 705
  • 3
  • 12
  • 22

1 Answers1

1

I got the same issue when trying to update few packages on my Mac.

With some try I manage to recover my installation I used these commands.

sudo pip uninstall conda
sudo pip install conda==4.1.6
sudo pip install conda_env==2.4.2
sudo pip install requests --upgrade

and I was able to do "conda info"

It seems that there is some conflict somewhere bit idea where and why. Probably you may have to reinstall/upgrade some other packages depending of the new error message you got.

Donald Duck
  • 8,409
  • 22
  • 75
  • 99
Dr. Fabien Tarrade
  • 1,556
  • 6
  • 23
  • 49