pip: ImportError: No module named 'pip._vendor.requests'

I installed python 2.7.5 and run python get-pip.py, system come out this error: Traceback (most recent call last):

  File "get-pip.py", line 19892, in <module>
    main()
  File "get-pip.py", line 152, in main
    bootstrap(tmpdir=tmpdir)
  File "get-pip.py", line 82, in bootstrap
    import pip
  File "/tmp/tmpwUQJB5/pip.zip/pip/__init__.py", line 15, in <module>

  File "/tmp/tmpwUQJB5/pip.zip/pip/vcs/mercurial.py", line 11, in <module>
  File "/tmp/tmpwUQJB5/pip.zip/pip/download.py", line 30, in <module>
  File "/tmp/tmpwUQJB5/pip.zip/pip/_vendor/__init__.py", line 81, in load_module

ImportError: No module named 'pip._vendor.requests'

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 26 (2 by maintainers)

Most upvoted comments

Same issue here with ubuntu. 12.04, upgrading system packages fixed it:

$ sudo pip install -U requests $ sudo pip install -U pip

EDIT : Issue still there in deed… investigating

EDIT : ok, a complete requests uninstall and install back via pip fixed the issue.

I encountered same problem on my CentsOS. After steps below, this issue was fixed:

  1. yum install openssl_devel 2)recompile python: make && make install. Maybe useful to you.

This could be caused by using “sudo pip” which is not supposed to be used in general. The solution that worked for me on Arch Linux is:

sudo rm -rf /usr/lib/python3.6/site-packages/pip /usr/lib/python3.6/site-packages/pkg_resources sudo pacman -S python-setuptools python-pip

Source: https://bbs.archlinux.org/viewtopic.php?id=237451

I have the same issue in OSX.