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

[Solved] Command '/usr/local/bin/pip list --outdated --format json' returned non-zero exit status 1 #125

Open
matt32106 opened this issue Nov 23, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@matt32106
Copy link

hippo@hippo-camp:~$ python3 -m pipupgrade --verbose --latest --yes
/usr/lib/python3.8/runpy.py:127: RuntimeWarning: 'pipupgrade.__main__' found in sys.modules after import of package 'pipupgrade', but prior to execution of 'pipupgrade.__main__'; this may result in unpredictable behaviour
  warn(RuntimeWarning(msg))
2021-11-23 11:21:57,858 | INFO | Environment: {'version': '0.2.0', 'python_version': '3.8.10', 'os': 'Linux-5.4.0-90-lowlatency-x86_64-with-glibc2.29', 'config': {'path': {'BASE': '/home/hippo/.local/lib/python3.8/site-packages/bpyutils', 'DATA': '/home/hippo/.local/lib/python3.8/site-packages/bpyutils/data', 'CACHE': '/home/hippo/.config/bpyutils', 'JOBS': '/home/hippo/.local/lib/python3.8/site-packages/bpyutils/jobs'}}, 'settings': {'settings': {'version': '0.2.0', 'cache_timeout': '86400', 'jobs': '4'}}}
2021-11-23 11:21:57,858 | INFO | Arguments Passed: {'args': (), 'kwargs': {'ARGUMENTS': <class 'inspect._empty'>, 'packages': [], 'resolve': False, 'ignore': None, 'pip_path': None, 'yes': True, 'clean': 0, 'check': 0, 'upgrade_type': ['minor', 'patch'], 'latest': True, 'format': 'table', 'all': 0, 'pip': 0, 'self': False, 'requirements': None, 'pipfile': None, 'interactive': 0, 'project': None, 'git_username': None, 'git_email': None, 'pull_request': False, 'github_access_token': None, 'github_reponame': None, 'github_username': None, 'target_branch': 'master', 'jobs': 4, 'user': 0, 'no_included_requirements': 0, 'no_cache': 0, 'output': None, 'ignore_error': 0, 'force': 0, 'doctor': False, 'no_color': 0, 'verbose': True}, 'a': <pipupgrade.commands.to_params.<locals>.O object at 0x7f5506f6d6d0>}
Checking...
2021-11-23 11:21:57,861 | INFO | `pip` executables found: ['/usr/local/bin/pip', '/usr/bin/pip3', '/usr/local/bin/pip2']
2021-11-23 11:21:57,861 | INFO | Using 4 jobs...
2021-11-23 11:21:57,869 | INFO | Fetching installed packages for /usr/local/bin/pip...
2021-11-23 11:21:57,869 | INFO | Fetching installed packages for /usr/bin/pip3...
2021-11-23 11:21:57,869 | INFO | Fetching installed packages for /usr/local/bin/pip2...
2021-11-23 11:21:57,870 | INFO | Executing command: /usr/local/bin/pip list --outdated --format json
2021-11-23 11:21:57,870 | INFO | Executing command: /usr/bin/pip3 list --outdated --format json
2021-11-23 11:21:57,870 | INFO | Executing command: /usr/local/bin/pip2 list --outdated --format json

concurrent.futures.process._RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/lib/python3.8/concurrent/futures/process.py", line 239, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
  File "/usr/lib/python3.8/concurrent/futures/process.py", line 198, in _process_chunk
    return [fn(*args) for args in chunk]
  File "/usr/lib/python3.8/concurrent/futures/process.py", line 198, in <listcomp>
    return [fn(*args) for args in chunk]
  File "/home/hippo/.local/lib/python3.8/site-packages/pipupgrade/commands/helper.py", line 319, in get_registry_from_pip
    _, output, _ = _pip.call("list", user = user, outdated = outdated, \
  File "/home/hippo/.local/lib/python3.8/site-packages/pipupgrade/_pip.py", line 76, in call
    output = popen(*params, output = output, raise_err = raise_err)
  File "/home/hippo/.local/lib/python3.8/site-packages/bpyutils/util/system.py", line 92, in popen
    raise PopenError(code, command)
bpyutils.exception.PopenError: Command '/usr/local/bin/pip list --outdated --format json' returned non-zero exit status 1.
"""

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

Traceback (most recent call last):
  File "/home/hippo/.local/lib/python3.8/site-packages/pipupgrade/commands/__init__.py", line 79, in command
    return _command(**ARGUMENTS)
  File "/home/hippo/.local/lib/python3.8/site-packages/pipupgrade/commands/__init__.py", line 240, in _command
    for registry in pool.imap_unordered(
  File "/usr/lib/python3.8/concurrent/futures/process.py", line 484, in _chain_from_iterable_of_lists
    for element in iterable:
  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 619, in result_iterator
    yield fs.pop().result()
  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 444, in result
    return self.__get_result()
  File "/usr/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
    raise self._exception
bpyutils.exception.PopenError: Command '/usr/local/bin/pip list --outdated --format json' returned non-zero exit status 1.

An error occured while performing the above command. This could be an issue with
"pipupgrade". Kindly post an issue at https://github.com/achillesrasquinha/pipupgrade/issues                     
@matt32106 matt32106 added the bug Something isn't working label Nov 23, 2021
@matt32106
Copy link
Author

matt32106 commented Nov 23, 2021

This seems to fix something wrong in pip:
For pip2.7, you can at first
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
then
python2.7 get-pip.py --force-reinstall
to reinstall pip.

When you run pipupgrade there is no more error afterwards.

@matt32106 matt32106 changed the title Command '/usr/local/bin/pip list --outdated --format json' returned non-zero exit status 1 [Solved] Command '/usr/local/bin/pip list --outdated --format json' returned non-zero exit status 1 Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants