Background
I\'m working on an academic project to (basically) analyze some \"who follows whom\" graphs and wanted to get some real data (by building
While Martin's solution works, as a work around, it does not provide a direct answer. Ubuntu's pip version for your Ubuntu version (12.04) is:
python-pip (1.0-1build1)
This is also the same version for Debian Wheezy. This version has a weired bug, which causes packages not to be removed.
If you obtain pip from upstream using the script get-pip.py
you will have a fixed version of pip which can remove pacakges (as of now v. 1.5.6).
Python's pip is really a fast moving target. So using Debian's or Ubuntu's pip is guaranteed to have bugs. Please don't use those distribution's pip
.
Instead install pip from upstream.
If you would like to register pip installed packages as system packages I really recommend that you also use stdeb.
You can always manually delete the packages; you can run:
sudo rm -rf /usr/local/lib/python2.7/dist-packages/twitter
to remove that package from your dist-packages
directory. You may have to edit the easy-install.pth
file in the same directory and remove the twitter
entry from it.
In my case (moving pyusb 0.4x to 1.0x), removing the old package with apt-get remove python-usb and manually installing the manually downloaded package via python setup.py worked. Not pretty, but working.
For me, it was due to the fact that I was running pip freeze
, which gave me different results than sudo pip freeze
.
Since I was uninstalling using sudo
, it was not uninstalling it in the "non-sudo
" session. Uninstalling without sudo
fixed that.
I was facing difficulty while upgrading a package because pip was not able to uninstall it successfully. I had to delete the .egg-info and the folder as well in /usr/lib/python2.7/dist-packages and then I tried to install with --upgrade and it worked.