ImportError: no module named urllib3 when installing pip

I have a problem with virtualenvwrapper that needs to be reinstalled as a first step, and I get a strange complaint about urllib3:

$ python get-pip.py Traceback (most recent call last): File "get-pip.py", line 19177, in <module> main() File "get-pip.py", line 194, in main bootstrap(tmpdir=tmpdir) File "get-pip.py", line 82, in bootstrap import pip File "/tmp/tmppQTQty/pip.zip/pip/__init__.py", line 16, in <module> File "/tmp/tmppQTQty/pip.zip/pip/vcs/mercurial.py", line 9, in <module> File "/tmp/tmppQTQty/pip.zip/pip/download.py", line 39, in <module> File "/tmp/tmppQTQty/pip.zip/pip/_vendor/requests/__init__.py", line 61, in <module> File "/tmp/tmppQTQty/pip.zip/pip/_vendor/requests/packages/__init__.py", line 29, in <module> ImportError: No module named urllib3 

when i search get-pip.py pip get-pip.py , I don't see urllib3 link.

I have python2.6, py2.7 and py3.4 on the machine

 cchilders:~/Downloads $ which python /usr/local/bin/python cchilders:~/Downloads $ which pip /usr/local/bin/pip cchilders:/usr/local/bin $ ls 2to3 easy_install-2.7 ipython pip3 smtpd.py celery fop ipython2 pip3.5 uncompyle2 celerybeat grunt jsonlint pydoc virtualenv celeryd idle pbr python virtualenv-clone celeryd-multi ipdb pip python2.6 virtualenvwrapper_lazy.sh charm iptest pip2 python2.6-config virtualenvwrapper.sh easy_install iptest2 pip2.7 python-config 

Python defaults to 2.6.9, which is not what I want:

 cchilders:/usr/bin $ python Python 2.6.9 

I do not have anaconda on the car, which caused someone else a problem. Any advice on what to do now, thanks, thanks.

+6
source share
1 answer

First of all, you should know which version of python you are using by default, suppose that if you are using python2.7, try to find the installed package packages in this version of python using the "freeze" or "freeze" function | grep -i urllib3

I think urllib3 is not installed

 wget https://pypi.python.org/packages/3b/f0/e763169124e3f5db0926bc3dbfcd580a105f9ca44cf5d8e6c7a803c9f6b5/urllib3-1.16.tar.gz#md5=fcaab1c5385c57deeb7053d3d7d81d59 tar xvf urllib3-1.16.tar.gz && cd urllib3-1.16/ python setup.py install 
+2
source

All Articles