TypechoJoeTheme

尘遇 logo

当我遇上你
排行榜
统计

pip3运行失败(pip3 install -r requirements.txt)

醉书生站长
2020年08月10日
0 评论
619 阅读
检测收录...
08/10
本文最后更新于2021年04月30日,已超过523天没有更新,若内容或图片失效,请留言反馈。

root@XXXX:/iCopy# pip3 install -r requirements.txt

ERROR: Exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 188, in _main
status = self.run(options, args)
File "/usr/local/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 185, in wrapper
return func(self, options, args)
File "/usr/local/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 278, in run
session = self.get_default_session(options)
File "/usr/local/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 83, in get_default_session
self._session = self.enter_context(self._build_session(options))
File "/usr/local/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 93, in _build_session
session = PipSession(
File "/usr/local/lib/python3.8/site-packages/pip/_internal/network/session.py", line 249, in init
self.headers["User-Agent"] = user_agent()
File "/usr/local/lib/python3.8/site-packages/pip/_internal/network/session.py", line 132, in user_agent
zip(["name", "version", "id"], distro.linux_distribution()),
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/distro.py", line 125, in linux_distribution
return _distro.linux_distribution(full_distribution_name)
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/distro.py", line 681, in linux_distribution
self.version(),
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/distro.py", line 741, in version
self.lsb_release_attr('release'),
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/distro.py", line 903, in lsb_release_attr
return self._lsb_release_info.get(attribute, '')
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/distro.py", line 556, in get
ret = obj.__dict__[self._fname] = self._f(obj)
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/distro.py", line 1014, in _lsb_release_info
stdout = subprocess.check_output(cmd, stderr=devnull)
File "/usr/local/lib/python3.8/subprocess.py", line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/local/lib/python3.8/subprocess.py", line 512, 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 "/usr/bin/pip3", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.8/site-packages/pip/_internal/cli/main.py", line 75, in main
return command.main(cmd_args)
File "/usr/local/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 114, in main
return self._main(args)
File "/usr/local/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 226, in _main
self.handle_pip_version_check(options)
File "/usr/local/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 152, in handle_pip_version_check
session = self._build_session(
File "/usr/local/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 93, in _build
...

查找:

sudo find / -name 'lsb_release.py'

复制:比如我的是3.8

sudo cp  /usr/lib/python3/dist-packages/lsb_release.py /usr/local/lib/python3.8/

解决

本文共11个字数,您已阅读:平均阅读时长≈1分钟。
pythonpip
朗读
点赞 0
赞赏
海报
欢迎
要时间嘉许,等春风得意,我正好遇上你!

微信/QQ/支付宝三合一收款码

微信
QQ
支付宝
打开微信/QQ/支付宝扫一扫,即可进行扫码打赏!
版权属于:

尘遇

最后修改:

2021 年 04 月 30 日 02 : 07 PM

本文链接:

https://chenyu.me/683.html(转载时请注明本文出处及文章链接)

暂无评论
那年今日

光阴者,百代之过客

今日已经过去小时
这周已经过去
本月已经过去
今年已经过去个月

最新回复

  1. 七月秀才
    2022-10-05
  2. 七月秀才
    2022-10-05
  3. 七月秀才
    2022-10-04
  4. 七月秀才
    2022-10-04
  5. 七月秀才
    2022-10-04