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
Assertion Error with pip list #1093
Comments
It happens when you install distribute using
|
Okay that fixed that problem but now I have a problem anytime I try to install a package or upgrade an outdated one. I have upgraded distribute, which also upgrades setuptools.
|
Python 2.6.5 error message: but pip==1.3.1 is ok |
I experienced the same error.
Upgrading distribute worked, thanks! |
Experienced the same problem, upgrading distribute worked for me as well. |
More thx for the pip install -U distribute |
After experiencing the
|
Just hit this on the latest Linux Mint (16) with the packaged version of pip (1.4.1) by running simply |
I have also run into this on Lubuntu (14.04 LTS) using pip==1.5.4. However upgrading distribute worked for me! |
@jetheurer can you say what version of distribute you were using when you encountered the bug? This should be the latest setuptools package you should be using http://packages.ubuntu.com/trusty/python-setuptools and hopefully nothing that calls itself distribute (distribute has been replaced by setuptools now). |
@Ivoz I am currently using distribute==0.7.3, using Python 2.7.6. It seems I have setuptools==0.6c11 installed as well |
@jetheurer I am not sure how you have managed to get such old versions while using 14.04. I'd suspect the old versions might be causing you the error. Trusty should normally be setuptools 3.3 Distribute was merged into setuptools a while ago now; as such you generally want to use a recent version of setuptools (almost anything above version 1.0 should work!). Latest version you can see here. Try to uninstall everything distribute / setuptools (double check!) and then reinstall a newer version would be my suggested course of action. |
I've installed |
I follow @arktrin 's comment and this is solved.
~@cherry-com(7875)$ pip list
adium-theme-ubuntu (0.3.4)
apt-xapian-index (0.45)
argparse (1.2.1)
boto (2.38.0)
bz2file (0.98)
chardet (2.3.0)
colorama (0.2.5)
command-not-found (0.3)
....................................
pyserial (2.6)
pysmbc (1.0.14.1)
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/list.py", line 80, in run
self.run_listing(options)
File "/usr/lib/python2.7/dist-packages/pip/commands/list.py", line 142, in run_listing
self.output_package_listing(installed_packages)
File "/usr/lib/python2.7/dist-packages/pip/commands/list.py", line 151, in output_package_listing
if dist_is_editable(dist):
File "/usr/lib/python2.7/dist-packages/pip/util.py", line 348, in dist_is_editable
req = FrozenRequirement.from_dist(dist, [])
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 236, in from_dist
assert len(specs) == 1 and specs[0][0] == '=='
AssertionError
Storing debug log for failure in /home/cherry/.pip/pip.log
|
The issue is still there in Ubuntu 15.04, pip 1.5.6, distribute-0.7.3 (the pip upgrade of 'pip' or 'distribute' does not work, as the issue seems to be Ubuntu specific. See below). The fix it:
Done! The issue logs:
|
@UzLA Thanks! This works for me too on Kubuntu 15.04. I built a salt state for this. |
@UzLA +1 for this. Once I had removed the ubuntu package, I used easy_install instead of downloading the official installer, but to the same effect :) |
@UzLA thanks, that did the trick for me too on Lubuntu 15.04/pip 7.1.0/python 2.7.9. |
@UzLA , Just want to confirm this worked for me, thanks. |
The issue seems to come from the obsolete distribute combined with an old pip version. Plus, the AssertionError is now clearer in latest versions since it now prints the offending dist (https://github.com/pypa/pip/blob/develop/pip/__init__.py#L262-L264) |
FWIW: I patched my locally installed pip
https://bugs.launchpad.net/ubuntu/+source/python-apt/+bug/1489443 |
@arktrin 's method work for me in Ubuntu 15.04 |
@arktrin 's method works for me too. |
pip install through apt-get installs a very old version. If you install a newer version of pip using easy_install u won't get this error.
U might also want to update setuptools this worked for me |
@kumardadi Worked for me as well. The pip package maintainers should really get a newer version into the Ubuntu and Debian package repos. |
We have no control over what version of pip Ubuntu and Debian ship. If you want a newer version in those repositories you'll need to contact Ubuntu and Debian and ask them for it. |
@dstufft Got any links or mailing lists I can use to contact them? |
https://lists.debian.org/debian-python/ Is their mailing list, but I don't actually suspect they'll upgrade the already released versions of Debian/Ubuntu. Unfortunately there isn't much we can do :( |
A medium priority bug report about upgrading pip has been filed in Ubuntu's launchpad: https://bugs.launchpad.net/pip/+bug/1445947 The bug was posted on 2015-04-19, but is yet to be assigned... if we're lucky, we might get it in Ubuntu 16.04. |
I got the following error:
What to do next? |
Doing what ? This seems completely unrelated to this issue, so open a new one ? |
Run 'sudo pip list' From: shruti927mailto:notifications@github.com I got the following error: Traceback (most recent call last): What to do next? Reply to this email directly or view it on GitHub: |
@kumardadi I tried running the command you told and then I got this error: The directory '/home/shrutika/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag What is sudo's -H flag and what should I do next? |
Run 'sudo -H pip list' this will solve From: shruti927mailto:notifications@github.com @kumardadi I tried running the command you told and then I got this error: The directory '/home/shrutika/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag What is sudo's -H flag and what should I do next? Reply to this email directly or view it on GitHub: |
@kumardadi I am still getting this: /usr/local/lib/python2.7/dist-packages/pip-7.1.2-py2.7.egg/pip/vendor/requests/packages/urllib3/util/ssl.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. |
@shruti927 what version of pip are you using? |
pip-7.1.2 and python 2.7.6 |
@UzLA Thanks, it worked for me |
Good. |
pip doesn't actually do any network traffic if a module is already installed, so there's actually no point in doing the check ourselves. And it's currently broken (missing ! and runs afoul of pypa/pip#1093 on trusty).
pip doesn't actually do any network traffic if a module is already installed, so there's actually no point in doing the check ourselves. And it's currently broken (missing ! and runs afoul of pypa/pip#1093 on trusty).
how can help me to fix this issue on freebsd, what am I doing wrong?
|
@gillymoreno this seems like the wrong place to report the issue, you should directly check with the |
I experienced the following error after installing pip and attempting a:
pip list --outdated
The text was updated successfully, but these errors were encountered: