General Gravicius
General Gravicius

Reputation: 301

Unable to uninstall python package with pip (Linux)

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?

Upvotes: 0

Views: 473

Answers (1)

sks-15
sks-15

Reputation: 147

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)

Upvotes: 1

Related Questions