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

Windows subsystem: Ubuntu error when "pipupgrade --latest --yes" #34

Closed
caniko opened this issue Jul 8, 2019 · 14 comments
Closed

Windows subsystem: Ubuntu error when "pipupgrade --latest --yes" #34

caniko opened this issue Jul 8, 2019 · 14 comments

Comments

@caniko
Copy link

caniko commented Jul 8, 2019

Printout:

Checking...
Traceback (most recent call last):
  File "/home/can/.local/bin/pipupgrade", line 11, in <module>
    sys.exit(main())
  File "/home/can/.local/lib/python3.6/site-packages/pipupgrade/cli/__init__.py", line 14, in wrapper
    return fn(**params)
  File "/home/can/.local/lib/python3.6/site-packages/pipupgrade/commands/__init__.py", line 178, in command
    format = "json", pip_exec = pip_)
  File "/home/can/.local/lib/python3.6/site-packages/pipupgrade/_pip.py", line 69, in call
    return popen(*params, output = True)
  File "/home/can/.local/lib/python3.6/site-packages/pipupgrade/util/system.py", line 70, in popen
    raise sp.CalledProcessError(code, command)
subprocess.CalledProcessError: Command '/usr/bin/pip3 list --outdated --format json' returned non-zero exit status 2.
@caniko caniko closed this as completed Jul 8, 2019
@caniko caniko reopened this Jul 8, 2019
@achillesrasquinha
Copy link
Owner

pip version?

@cocoonkid
Copy link

cocoonkid commented Jul 21, 2019

I have a similar issue:

pipupgrade
Checking...
Traceback (most recent call last):
File "/Users/cocoonkid/.pyenv/versions/3.7.1/bin/pipupgrade", line 10, in
sys.exit(main())
File "/Users/cocoonkid/.pyenv/versions/3.7.1/lib/python3.7/site-packages/pipupgrade/cli/init.py", line 14, in wrapper
return fn(**params)
File "/Users/cocoonkid/.pyenv/versions/3.7.1/lib/python3.7/site-packages/pipupgrade/commands/init.py", line 178, in command
format = "json", pip_exec = pip_)
File "/Users/cocoonkid/.pyenv/versions/3.7.1/lib/python3.7/site-packages/pipupgrade/_pip.py", line 69, in call
return popen(*params, output = True)
File "/Users/cocoonkid/.pyenv/versions/3.7.1/lib/python3.7/site-packages/pipupgrade/util/system.py", line 70, in popen
raise sp.CalledProcessError(code, command)
subprocess.CalledProcessError: Command '/Users/cocoonkid/.pyenv/shims/pip2 list --outdated --format json' returned non-zero exit status 127.

The command should run pip3 list --outdated --format json

pip --version
pip 19.1.1 from /Users/cocoonkid/.pyenv/versions/3.7.1/lib/python3.7/site-packages/pip (python 3.7)

Thank you for this great tool!

@achillesrasquinha
Copy link
Owner

Hi guys, does this issue still exist with latest version 1.6.5?

@tibor
Copy link

tibor commented Jan 7, 2020

Got a similar issue with the newest pipupgrade:


pipupgrade 
Checking...
multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar
    return list(map(*args))
  File "/usr/local/lib/python3.6/dist-packages/pipupgrade/commands/helper.py", line 146, in get_registry_from_pip
    format = "json", pip_exec = pip_path, output = True)
  File "/usr/local/lib/python3.6/dist-packages/pipupgrade/_pip.py", line 74, in call
    output = popen(*params, output = output, raise_err = raise_err)
  File "/usr/local/lib/python3.6/dist-packages/pipupgrade/util/system.py", line 78, in popen
    raise PopenError(code, command)
pipupgrade.exception.PopenError: Command '/usr/bin/pip3 list --outdated --format json' returned non-zero exit status 2.
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/bin/pipupgrade", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/dist-packages/pipupgrade/cli/__init__.py", line 15, in wrapper
    return fn(**params)
  File "/usr/local/lib/python3.6/dist-packages/pipupgrade/commands/__init__.py", line 153, in command
    pip_path
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 266, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 644, in get
    raise self._value
pipupgrade.exception.PopenError: Command '/usr/bin/pip3 list --outdated --format json' returned non-zero exit status 2.

@achillesrasquinha
Copy link
Owner

@tibor pip version?

@tibor
Copy link

tibor commented Jan 7, 2020

@achillesrasquinha pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)

@achillesrasquinha
Copy link
Owner

achillesrasquinha commented Jan 8, 2020

@tibor Hmm, does pip list --format json work for you?

@achillesrasquinha
Copy link
Owner

achillesrasquinha commented Jan 8, 2020

I'm guessing pip list --format json wouldn't exist for your pip version. Although I look forward to support versions beyond pip 9+, by best guess would be to try updating pip

$ pipupgrade --pip

@tibor
Copy link

tibor commented Jan 8, 2020

pip list --format json doesn’t work, but pip3 list --format json works as expected

@achillesrasquinha
Copy link
Owner

Hmm,

Could you provide me the output for pip --version and pip3 --version?

@tibor
Copy link

tibor commented Jan 13, 2020

pip --version
-bash: pip: command not found
pip3 --version
pip 19.3.1 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)

@tibor
Copy link

tibor commented Jan 13, 2020

Fixed this indeed by upgrading pip3 with
sudo pip3 install --upgrade pip

pypa/pip#5429

@achillesrasquinha
Copy link
Owner

@tibor Nice, You can also pass --pip-path using pipupgrade as follows

$ pipupgrade --pip-path pip3

@achillesrasquinha
Copy link
Owner

Closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants