subprocess.CalledProcessError: Command ‘(‘lsb_release’, ‘-a’)’ returned non-zero exit status 1.

1,046次阅读
ERROR: Exception:
Traceback (most recent call last):
  File "/tmp/tmpsfqmyj94/pip.zip/pip/_internal/cli/base_command.py", line 173, in _main
    status = self.run(options, args)
  File "/tmp/tmpsfqmyj94/pip.zip/pip/_internal/cli/req_command.py", line 203, in wrapper
    return func(self, options, args)
  File "/tmp/tmpsfqmyj94/pip.zip/pip/_internal/commands/install.py", line 266, in run
    session = self.get_default_session(options)
  File "/tmp/tmpsfqmyj94/pip.zip/pip/_internal/cli/req_command.py", line 74, in get_default_session
    self._session = self.enter_context(self._build_session(options))
  File "/tmp/tmpsfqmyj94/pip.zip/pip/_internal/cli/req_command.py", line 88, in _build_session
    session = PipSession(
  File "/tmp/tmpsfqmyj94/pip.zip/pip/_internal/network/session.py", line 289, in __init__
    self.headers["User-Agent"] = user_agent()
  File "/tmp/tmpsfqmyj94/pip.zip/pip/_internal/network/session.py", line 132, in user_agent
    linux_distribution = distro.linux_distribution()  # type: ignore
  File "/tmp/tmpsfqmyj94/pip.zip/pip/_vendor/distro.py", line 125, in linux_distribution
    return _distro.linux_distribution(full_distribution_name)
  File "/tmp/tmpsfqmyj94/pip.zip/pip/_vendor/distro.py", line 681, in linux_distribution
    self.version(),
  File "/tmp/tmpsfqmyj94/pip.zip/pip/_vendor/distro.py", line 741, in version
    self.lsb_release_attr('release'),
  File "/tmp/tmpsfqmyj94/pip.zip/pip/_vendor/distro.py", line 903, in lsb_release_attr
    return self._lsb_release_info.get(attribute, '')
  File "/tmp/tmpsfqmyj94/pip.zip/pip/_vendor/distro.py", line 556, in __get__
    ret = obj.__dict__[self._fname] = self._f(obj)
  File "/tmp/tmpsfqmyj94/pip.zip/pip/_vendor/distro.py", line 1014, in _lsb_release_info
    stdout = subprocess.check_output(cmd, stderr=devnull)
  File "/usr/local/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/local/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1.
Traceback (most recent call last):
  File "/root/get-pip.py", line 24424, in <module>
    main()
  File "/root/get-pip.py", line 139, in main
    bootstrap(tmpdir=tmpdir)
  File "/root/get-pip.py", line 121, in bootstrap
    sys.exit(pip_entry_point(args))
  File "/tmp/tmpsfqmyj94/pip.zip/pip/_internal/cli/main.py", line 70, in main
  File "/tmp/tmpsfqmyj94/pip.zip/pip/_internal/cli/base_command.py", line 98, in main
  File "/tmp/tmpsfqmyj94/pip.zip/pip/_internal/cli/base_command.py", line 214, in _main
  File "/tmp/tmpsfqmyj94/pip.zip/pip/_internal/cli/req_command.py", line 143, in handle_pip_version_check
  File "/tmp/tmpsfqmyj94/pip.zip/pip/_internal/cli/req_command.py", line 88, in _build_session
  File "/tmp/tmpsfqmyj94/pip.zip/pip/_internal/network/session.py", line 289, in __init__
  File "/tmp/tmpsfqmyj94/pip.zip/pip/_internal/network/session.py", line 132, in user_agent
  File "/tmp/tmpsfqmyj94/pip.zip/pip/_vendor/distro.py", line 125, in linux_distribution
  File "/tmp/tmpsfqmyj94/pip.zip/pip/_vendor/distro.py", line 681, in linux_distribution
  File "/tmp/tmpsfqmyj94/pip.zip/pip/_vendor/distro.py", line 741, in version
  File "/tmp/tmpsfqmyj94/pip.zip/pip/_vendor/distro.py", line 903, in lsb_release_attr
  File "/tmp/tmpsfqmyj94/pip.zip/pip/_vendor/distro.py", line 556, in __get__
  File "/tmp/tmpsfqmyj94/pip.zip/pip/_vendor/distro.py", line 1014, in _lsb_release_info
  File "/usr/local/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/local/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 1.

fix

sudo rm /usr/bin/lsb_release

正文完