Skip to content

Pip crashes when run from a pip-review==1.0 #4980

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

Closed
gleb-chipiga opened this issue Jan 20, 2018 · 7 comments
Closed

Pip crashes when run from a pip-review==1.0 #4980

gleb-chipiga opened this issue Jan 20, 2018 · 7 comments
Labels
auto-locked Outdated issues that have been locked by automation resolution: duplicate Duplicate of an existing issue/PR

Comments

@gleb-chipiga
Copy link

gleb-chipiga commented Jan 20, 2018

  • Pip version: 9.0.1
  • Python version: 3.6.3
  • Operating system: Ubuntu 17.10
  • Pip-review: 1.0

Description:

Pip crashes when run from a pip-review==1.0 (https://pypi.python.org/pypi/pip-review/1.0).

What I've run:

pip-review -i

Exception:
Traceback (most recent call last):
File "/home/gleb/.virtualenvs/dev/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/gleb/.virtualenvs/dev/lib/python3.6/site-packages/pip/commands/list.py", line 157, in run
packages = self.get_outdated(packages, options)
File "/home/gleb/.virtualenvs/dev/lib/python3.6/site-packages/pip/commands/list.py", line 168, in get_outdated
dist for dist in self.iter_packages_latest_infos(packages, options)
File "/home/gleb/.virtualenvs/dev/lib/python3.6/site-packages/pip/commands/list.py", line 169, in
if dist.latest_version > dist.parsed_version
TypeError: '>' not supported between instances of 'Version' and 'SetuptoolsVersion'
Traceback (most recent call last):
File "/home/gleb/.virtualenvs/dev/bin/pip-review", line 11, in
sys.exit(main())
File "/home/gleb/.virtualenvs/dev/lib/python3.6/site-packages/pip_review/main.py", line 201, in main
outdated = get_outdated_packages(forwarded)
File "/home/gleb/.virtualenvs/dev/lib/python3.6/site-packages/pip_review/main.py", line 185, in get_outdated_packages
output = check_output(command).decode('utf-8')
File "/usr/lib/python3.6/subprocess.py", line 336, in check_output
**kwargs).stdout
File "/usr/lib/python3.6/subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/home/gleb/.virtualenvs/dev/bin/python3', '-m', 'pip', 'list', '--outdated', '--disable-pip-version-check', '--format=json']' returned non-zero exit status 2.
@jgonggrijp
Copy link

jgonggrijp commented Jan 20, 2018

You write "when run from pip-review", but that shouldn't make a difference to pip. If you manually run /home/gleb/.virtualenvs/dev/bin/python3 -m pip list --outdated --disable-pip-version-check --format=json, does that crash with exit status 2, too?

@gleb-chipiga
Copy link
Author

gleb-chipiga commented Jan 20, 2018

/home/gleb/.virtualenvs/dev/bin/python3 -m pip list --outdated --disable-pip-version-check --format=json
Exception:
Traceback (most recent call last):
  File "/home/gleb/.virtualenvs/dev/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/home/gleb/.virtualenvs/dev/lib/python3.6/site-packages/pip/commands/list.py", line 157, in run
    packages = self.get_outdated(packages, options)
  File "/home/gleb/.virtualenvs/dev/lib/python3.6/site-packages/pip/commands/list.py", line 168, in get_outdated
    dist for dist in self.iter_packages_latest_infos(packages, options)
  File "/home/gleb/.virtualenvs/dev/lib/python3.6/site-packages/pip/commands/list.py", line 169, in <listcomp>
    if dist.latest_version > dist.parsed_version
TypeError: '>' not supported between instances of 'Version' and 'SetuptoolsVersion'
echo $?
2

@pradyunsg
Copy link
Member

Hi @gleb-chipiga!

I think this is essentially #3057. Could you check if that is the case?

@pradyunsg pradyunsg added resolution: duplicate Duplicate of an existing issue/PR S: awaiting response Waiting for a response/more information labels Jan 21, 2018
@gleb-chipiga
Copy link
Author

pip3 list -o
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
Exception:
Traceback (most recent call last):
  File "/home/gleb/.virtualenvs/dev/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/home/gleb/.virtualenvs/dev/lib/python3.6/site-packages/pip/commands/list.py", line 157, in run
    packages = self.get_outdated(packages, options)
  File "/home/gleb/.virtualenvs/dev/lib/python3.6/site-packages/pip/commands/list.py", line 168, in get_outdated
    dist for dist in self.iter_packages_latest_infos(packages, options)
  File "/home/gleb/.virtualenvs/dev/lib/python3.6/site-packages/pip/commands/list.py", line 169, in <listcomp>
    if dist.latest_version > dist.parsed_version
TypeError: '>' not supported between instances of 'Version' and 'SetuptoolsVersion'

@pradyunsg
Copy link
Member

pradyunsg commented Jan 21, 2018

This is a duplicate of #3057. pip3 install --force-reinstall pip should fix your problem.

@pradyunsg pradyunsg added the S: needs triage Issues/PRs that need to be triaged label May 11, 2018
@pradyunsg
Copy link
Member

@gleb-chipiga Do close this issue if the above works for you and solved your issue.

@lock
Copy link

lock bot commented May 29, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label May 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators May 29, 2019
@pradyunsg pradyunsg removed the S: awaiting response Waiting for a response/more information label Mar 17, 2023
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 resolution: duplicate Duplicate of an existing issue/PR
Projects
None yet
Development

No branches or pull requests

3 participants