Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip uninstall on Ubuntu(Linux) #6

Closed
vbabiy opened this issue Mar 15, 2011 · 20 comments
Closed

pip uninstall on Ubuntu(Linux) #6

vbabiy opened this issue Mar 15, 2011 · 20 comments
Labels
type: bug A confirmed bug or unintended behavior

Comments

@vbabiy
Copy link
Contributor

vbabiy commented Mar 15, 2011

I try install package via pip and immediately uninstall it but I see that package which have puted to my a python folder not uninstall after command: pip uninstall although pip in sell said me that pakage has uninstalled.
I think that it is bug.

Thanks


@vbabiy
Copy link
Contributor Author

vbabiy commented Mar 15, 2011

Issue #105 was marked as a duplicate of this issue.


Original Comment By: Carl Meyer

@vbabiy
Copy link
Contributor Author

vbabiy commented Mar 15, 2011

Hi,

This is quite possible. In order to look into it more, I'd need to know which
package, how you installed it, and what version of pip you are using. Could
you attach a shell transcript showing you running "pip --version" and then
showing the sequence of commands demonstrating the bug?

Thanks!


Original Comment By: Carl Meyer

@vbabiy
Copy link
Contributor Author

vbabiy commented Mar 15, 2011

Pip --versuion is

" $ pip --version pip 0.7 from /usr/local/lib/python2.6/dist-packages
(python 2.6) " I install package via linux-shell:
http://dpaste.com/188922/ and uninstall: http://dpaste.com/188923/

As you see folder "registration" not delete.


Original Comment By: romankrv

@vbabiy
Copy link
Contributor Author

vbabiy commented Mar 15, 2011

Hmm, I can't duplicate this. When I run the same sequence of commands, I get
the following output from the uninstall:
http://paste.pocoo.org/show/207610/

And both the registration/ and the .egg-info directory are deleted. This is on
Ubuntu 9.10.

The thing that looks odd to me about your paste is that the .egg-info
directories appear to be missing the py-version that is usually there. (Note
how in my paste the name of the registration .egg-info directory includes
py2.6). So that could explain why pip isn't finding the metadata correctly;
the question is why the egg-name is different from what it usually is?


Original Comment By: Carl Meyer

@vbabiy
Copy link
Contributor Author

vbabiy commented Mar 15, 2011

I have Ubuntu 10.04


Original Comment By: romankrv

@vbabiy
Copy link
Contributor Author

vbabiy commented Mar 15, 2011

The reporter's dpaste is no longer up to make sure, but I suspect this may
well be the case discussed in #107, comment 5.

has-the


Original Comment By: zarf

@vbabiy
Copy link
Contributor Author

vbabiy commented Mar 15, 2011

I had the same problem with Ubuntu 10.04 and pip 0.8 (using system's python).


Original Comment By: douglascamata

@vbabiy
Copy link
Contributor Author

vbabiy commented Mar 15, 2011

I found the problem by looking into the uninstall function of
InstallRequirement class inside req.py.

Environment: ubuntu 10.04 and pip 0.8 (similar to other users) Example module:
sorl_thumbnail-3.2.5.egg-info

on line 410 of req.py: it tries to test if "/usr/local/lib/python2.6/dist-
packages/sorl_thumbnail-3.2.5-py2.6.egg-info" exists, now you see the problem?
pip is supposed to install the package with "py2.6", the version in the name,
but somehow it doesn't. The problem only exists if you install packages into
/usr/local.

There is no problem at all working with virtualenv.


Original Comment By: Xinjiang Lü

@vbabiy
Copy link
Contributor Author

vbabiy commented Mar 15, 2011

I finally figured out this problem.

It has something to do with setuptools. In ubuntu 10.04, the default
setuptools is 0.6.10 residing under /usr/share/pyshared/, (softlinked by
/usr/lib/python2.6/dist-packages). After pip installs 0.6c11 into
/usr/local/lib/python2.6/dist-packages, unfortunately, the old version of
setuptools is still called when pip calls the sub_process to setup the
package. This problem may exist with all debian-like distributions.

SOLUTION: sudo aptitude purge python-setuptools If you are obsessed, you may
change *.egg-info to *.py2.6.egg-info under /usr/local/lib/python2.6/dist-
packages, then pip can see the installed packages.


Original Comment By: Xinjiang Lü

@vbabiy
Copy link
Contributor Author

vbabiy commented Mar 15, 2011

  • Changed status from resolved to open.

Original Comment By: Hugo Lopes Tavares

@vbabiy
Copy link
Contributor Author

vbabiy commented Mar 15, 2011

I still have this problem with Ubuntu 10.10. The packages installed through
pip don't have the -py2.6.egg-info under /usr/local/lib/python2.6/dist-
packages. The python-setuptools package is version 0.6.14 in ubuntu and that
doesn't seem to solve the problem. Ubuntu users fall into this pit, because
they install pip by using easy-install. It's probably better to download the
source tarball for pip if you want to install pip.

NOT SOLVED: it's chicken and egg. You can't install pip without setuptools.
What is recommended?


Original Comment By: Dries Desmet

@vbabiy
Copy link
Contributor Author

vbabiy commented Mar 15, 2011

I downloaded setuptools 0.6c11 from PyPi as a tarball and installed that. Then
I used easy_install to install pip and from now on everything works as
expected. The egg-info directories have -py2.6 in them.

So, could be a debian package issue. After all, I don't get why the package
seems to have a 0.6.14 version number while the latest setuptools is at
0.6c11. I still don't know what is going on exactly. Is the version in ubuntu
repo's older than what pip is expecting?


Original Comment By: Dries Desmet

@vbabiy
Copy link
Contributor Author

vbabiy commented Mar 15, 2011

Issue #208 was marked as a duplicate of this issue.

silently


Original Comment By: Kelsey Hightower

@vbabiy
Copy link
Contributor Author

vbabiy commented Mar 15, 2011

Issue #219 was marked as a duplicate of this issue.

site


Original Comment By: Chris Lasher

@vbabiy
Copy link
Contributor Author

vbabiy commented Mar 15, 2011

I have filed Bug #725178 on Launchpad regarding the inconsistent behavior of
the version of Distribute shipped with the python-setuptools package.

https://bugs.launchpad.net/ubuntu/+source/distribute/+bug/725178


Original Comment By: Chris Lasher

@vbabiy
Copy link
Contributor Author

vbabiy commented Mar 15, 2011

Given that "pip uninstall" gets the egg-info name that it looks for by calling
pkg_resources, which is also part of setuptools/distribute, this is clearly a
problem with Ubuntu's python-setuptools (actually distribute) package. It
shouldn't be installing with one .egg-info dir name and providing a different
one from pkg_resources.Distribution.egg_name().


Original Comment By: Carl Meyer

@vbabiy
Copy link
Contributor Author

vbabiy commented Mar 15, 2011

Posted more details on the Ubuntu bug at https://bugs.launchpad.net/ubuntu/+s
ource/distribute/+bug/725178/comments/1


Original Comment By: Carl Meyer

@vbabiy
Copy link
Contributor Author

vbabiy commented Mar 15, 2011

I agree, Carl, the onus of this bug does seem to fall on the shoulders of
Ubuntu/Debian. I have directly contacted Matthias Klose, who is listed in the
Debian changelogs for the Ubuntu package, and pointed him to the Launchpad bug
report to see if we can elicit his help in resolving this from the Ubuntu-
side.


Original Comment By: Chris Lasher

@vbabiy
Copy link
Contributor Author

vbabiy commented Mar 15, 2011

Added some more info

[https://bugs.launchpad.net/ubuntu/+source/distribute/+bug/725178/comments/2][
1]

i guess replacing basename in the last branch is unnecessary. Well, i removed
that line of code on my ubuntu and pip now is working the right way (or at
least that's what it seems!). I can't say if this change can introduce new
bugs..


Original Comment By: https://bugs.launchpad.net/ubuntu/+source/distribute/+bug/725178/comments/2

@vbabiy
Copy link
Contributor Author

vbabiy commented Mar 15, 2011

Thanks all for the assistance in tracking this down. It is in fact a bug in
Debian's python-setuptools package, I've discussed it with the Debian python-
setuptools maintainer and filed http://bugs.debian.org/cgi-
bin/bugreport.cgi?bug=618367

I've also pushed a workaround in pip to the new git repo which should fix this
for users of the Debian/Ubuntu setuptools package until it's fixed in
Debian/Ubuntu: https://github.com/pypa/pip/commit/0d60e37273c587237cd2f0678ec
f19005d49cea7


Original Comment By: Carl Meyer

@pypa pypa locked as resolved and limited conversation to collaborators May 29, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A confirmed bug or unintended behavior
Projects
None yet
Development

No branches or pull requests

1 participant