0

When running pip uninstall requests I get:

Uninstalling requests-2.22.0:
  Would remove:
    /usr/lib/python3.7/site-packages/requests
    /usr/lib/python3.7/site-packages/requests-2.22.0-py3.7.egg-info
Proceed (y/n)? y

Then: PermissionError: [Errno 13] Permission denied: 'utils.py'

What to do?

2
  • sudo pip uninstall?? Commented Dec 3, 2019 at 13:59
  • 1
    I tried that, it throws this error ModuleNotFoundError: No module named 'pip._internal.main' Commented Dec 3, 2019 at 14:02

1 Answer 1

1

Make sure you have the latest version of pip:

pip install --upgrade pip

Now pip is updated to pip3(for python3.x). You can now use either pip or pip3.

Now use python3 -m to run required modules:

python3 -m pip3 uninstall requests

or you can use sudo:

sudo python3 -m pip3 uninstall requests           (not recommended)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.