1

I am trying to uninstall pip using this command in macOS terminal:

pip uninstall pip

The error I am receiving is:

ImportError: cannot import name 'requests'

I have tried many other commands, some unrelated to uninstalling pip such as:

pip --version

I have tried reinstalling the requests module with

pip install requests

All of them are result in the same error.

ImportError: cannot import name 'requests'

Update: I tried to restore pip to pip 9.0.3 using

pip install --upgrade pip==9.0.3

and I tried importing requests. Both resulted in the same error.

Alex Angus
  • 59
  • 1
  • 9
  • Possible duplicate of [ImportError: cannot import name requests](https://stackoverflow.com/questions/50101692/importerror-cannot-import-name-requests) – phd Jul 26 '18 at 00:49

1 Answers1

1

I am guessing your pip version is 10.+ . It seems to be broken for some users.

what you can do is manually install a pip package from here enter link description here.

Click on download files and download the pip-18.0.tar.gz file.

After that go to your downloads directory and expand the zipped file with a:

tar -xvf pip-18.0.tar.gz

it will expand it to a folder or dir named pip-18.0, do a:

cd pip-18.0

follow that by running the setup.py file with the following command:

python setup.py install

It will work

Inder
  • 3,711
  • 9
  • 27
  • 42