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 list --outdated throws an AssertionError #1418

Closed
nvie opened this issue Jan 2, 2014 · 5 comments
Closed

pip list --outdated throws an AssertionError #1418

nvie opened this issue Jan 2, 2014 · 5 comments
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@nvie
Copy link

nvie commented Jan 2, 2014

When I run pip list --outdated, I get this:

$ pip list --outdated
Exception:
Traceback (most recent call last):
  File "/Users/nvie/.virtualenvs/foo/lib/python2.7/site-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/Users/nvie/.virtualenvs/foo/lib/python2.7/site-packages/pip/commands/list.py", line 74, in run
    self.run_outdated(options)
  File "/Users/nvie/.virtualenvs/foo/lib/python2.7/site-packages/pip/commands/list.py", line 83, in run_outdated
    for dist, remote_version_raw, remote_version_parsed in self.find_packages_latests_versions(options):
  File "/Users/nvie/.virtualenvs/foo/lib/python2.7/site-packages/pip/commands/list.py", line 119, in find_packages_latests_versions
    installed_packages = get_installed_distributions(local_only=options.local, include_editables=False, skip=self.skip)
  File "/Users/nvie/.virtualenvs/foo/lib/python2.7/site-packages/pip/util.py", line 387, in get_installed_distributions
    and editable_test(d)
  File "/Users/nvie/.virtualenvs/foo/lib/python2.7/site-packages/pip/util.py", line 377, in <lambda>
    editable_test = lambda d: not dist_is_editable(d)
  File "/Users/nvie/.virtualenvs/foo/lib/python2.7/site-packages/pip/util.py", line 347, in dist_is_editable
    req = FrozenRequirement.from_dist(dist, [])
  File "/Users/nvie/.virtualenvs/foo/lib/python2.7/site-packages/pip/__init__.py", line 231, in from_dist
    assert len(specs) == 1 and specs[0][0] == '=='
AssertionError

I don't know where this is coming from. pip freeze just shows a list of packages as expected, no issues or weird things going on there.

What should I add to help resolve/debug this issue?

@Dapid
Copy link

Dapid commented Jan 3, 2014

I found the same issue. The error is thrown when it reaches a library intalled from a git repository.

In the log

/bin/pip run on Fri Jan  3 12:14:14 2014
Found command 'git' at '/bin/git'
Running command /bin/git config remote.origin.url
git@github.com:Dapid/pywt.git
Running command /bin/git rev-parse HEAD
5cb9b82e54698a0db9c398e1575e71f107cfcb9a

Running command /bin/git show-ref
8d99479dd20cf82612ff3efcb071b418704c1872 refs/heads/backup-master
affc30ad810ba19b7439bd477e6501644fd707eb refs/heads/fix-functions
... [other blobs]
Exception:

@dstufft
Copy link
Member

dstufft commented Jan 3, 2014

Is this new in 1.5 or did it occur in 1.4 as well?

@nvie
Copy link
Author

nvie commented Jan 6, 2014

I just confirmed this also occurs on pip 1.4.

@andrewgross
Copy link

I saw a similar issue with pip freeze on older pip versions pip 1.1 and 1.4. I resolved my issue by locking setuptools to =<7.0.

@xavfernandez
Copy link
Member

Certainly a #1093 duplicate, could be closed.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

No branches or pull requests

5 participants