【解决】subprocess.CalledProcessError: Command ‘(‘lsb_release‘, ‘-a‘)‘ returned non-zero exit status 127

pip list 报错

Traceback (most recent call last):
  File "/home/sensetime/.pyenv/versions/3.6.5/bin/pip", line 11, in <module>
    sys.exit(main())
  File "/home/sensetime/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pip/_internal/cli/main.py", line 75, in main
    return command.main(cmd_args)
  File "/home/sensetime/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 105, in main
    return self._main(args)
  File "/home/sensetime/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 224, in _main
    self.handle_pip_version_check(options)
  File "/home/sensetime/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pip/_internal/cli/req_command.py", line 146, in handle_pip_version_check
    timeout=min(5, options.timeout)
  File "/home/sensetime/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pip/_internal/cli/req_command.py", line 91, in _build_session
    index_urls=self._get_index_urls(options),
  File "/home/sensetime/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pip/_internal/network/session.py", line 241, in __init__
    self.headers["User-Agent"] = user_agent()
  File "/home/sensetime/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pip/_internal/network/session.py", line 132, in user_agent
    zip(["name", "version", "id"], distro.linux_distribution()),
  File "/home/sensetime/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pip/_vendor/distro.py", line 122, in linux_distribution
    return _distro.linux_distribution(full_distribution_name)
  File "/home/sensetime/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pip/_vendor/distro.py", line 677, in linux_distribution
    self.version(),
  File "/home/sensetime/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pip/_vendor/distro.py", line 737, in version
    self.lsb_release_attr('release'),
  File "/home/sensetime/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pip/_vendor/distro.py", line 899, in lsb_release_attr
    return self._lsb_release_info.get(attribute, '')
  File "/home/sensetime/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pip/_vendor/distro.py", line 552, in __get__
    ret = obj.__dict__[self._fname] = self._f(obj)
  File "/home/sensetime/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pip/_vendor/distro.py", line 1012, in _lsb_release_info
    stdout = subprocess.check_output(cmd, stderr=devnull)
  File "/home/sensetime/.pyenv/versions/3.6.5/lib/python3.6/subprocess.py", line 336, in check_output
    **kwargs).stdout
  File "/home/sensetime/.pyenv/versions/3.6.5/lib/python3.6/subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '('lsb_release', '-a')' returned non-zero exit status 127.
sensetime@liu:~/Downloads/SMATP_website-master-0407/SMATP$ lsb_release -a

 

解决

执行:sudo rm /usr/bin/lsb_release

 

 

  • 3
    点赞
  • 3
    评论
  • 4
    收藏
  • 一键三连
    一键三连
  • 扫一扫,分享海报

相关推荐
©️2020 CSDN 皮肤主题: Age of Ai 设计师:meimeiellie 返回首页
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值