6

I was trying to uninstall program using pip uninstall South and it give me following error

Not uninstalling South at /usr/lib/python2.7/dist-packages, owned by OS

I'm in production machine and unable to fix this issue. What would be the soultion for this.

pip - 1.5.4, ununtu - 14.04

  • Have you tried it with sudo  pip uninstall South – A.B. Jul 13 '15 at 15:35
  • I'm with root privilege... – nKandel Jul 13 '15 at 15:36
  • How did you install it in the first place? – muru Jul 13 '15 at 15:36
  • 1
    Converted my comment into an answer. :) – A.B. Jul 13 '15 at 15:41
  • @nKandel depends on how you became root. – muru Jul 13 '15 at 16:20
2

The files are present in /usr/lib/python2.7/dist-packages, therefore uninstall with sudo rights.

sudo pip uninstall South
| improve this answer | |
  • Do you guess any reason why this happens... Initially I was with root privilege and was unable to uninstall it. Though I was able to uninstall other programs with similar privileges... Thanks – nKandel Jul 13 '15 at 15:44
  • 11
    I get the same error even if I use sudo. – duality_ Sep 15 '15 at 18:27
2

I solved the issue by running:

sudo rm -rf /usr/lib/python2.7/dist-packages/six-1.5.2.egg-info

(I found the command on this GitHub issue).

I was facing a similar error on Kubuntu 14.04 LTS x64:

f@f-Aurora-R4:~/ta/hw4/code$ sudo pip uninstall scipy
Not uninstalling scipy at /usr/lib/python2.7/dist-packages, owned by OS
f@f-Aurora-R4:~/ta/hw4/code$ Not uninstalling scipy at /usr/lib/python2.7/dist-packages, owned by OS
| improve this answer | |
  • I also had to sudo pip uninstall six && sudo pip install six – Jonathan Feb 8 '17 at 2:11
2

The correct solution for that is sudo apt-get remove python-virtualenv. It will remove virtualenv completely in your system.

| improve this answer | |
2

I solved the problem with the following command:

sudo apt-get remove python-virtualenv

Ubuntu 14.04 LTS

| improve this answer | |
0

I solved the issue by upgrading pip. After

sudo pip install --upgrade pip 

and ignoring

Found existing installation: pip 1.5.4
Not uninstalling pip at /usr/lib/python2.7/dist-packages, owned by OS

I was able to remove the package I wanted to.

| improve this answer | |
0

I had the same issue while installing flask on Ubuntu 14.04

$ sudo pip install flask 
Requirement already satisfied (use --upgrade to upgrade): flask in /usr/lib/python2.7/dist-packages
Requirement already satisfied (use --upgrade to upgrade): Werkzeug>=0.7 in /usr/lib/python2.7/dist-packages (from flask)
Requirement already satisfied (use --upgrade to upgrade): Jinja2>=2.4 in /usr/lib/python2.7/dist-packages (from flask)
Requirement already satisfied (use --upgrade to upgrade): itsdangerous>=0.21 in /usr/lib/python2.7/dist-packages (from flask)
Requirement already satisfied (use --upgrade to upgrade): markupsafe in /usr/lib/python2.7/dist-packages (from Jinja2>=2.4->flask)

Solved it by issuing this command:

sudo pip install --upgrade flask.

This will fix any issues with flask and install it properly.

| improve this answer | |
0

Give a try to

Sudo easy_install -U pip.

It worked for me - six: module references path Removing six 1.8.0 from easy-install.pth file Adding six 1.11.0 to easy-install.pth file

| improve this answer | |
-1

This should fix the problem, as it fixed mine on Ubuntu 14.x.

Install pip (even if it is already installed), securely download get-pip.py from here. Then run the following:

sudo python get-pip.py
| improve this answer | |
  • 2
    This seems to just install pip. How is that related to the problem? – Jonathan Feb 8 '17 at 2:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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