TypechoJoeTheme

一个梦想 | A Dream

统计

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

2020-08-10
/
0 评论
/
71 阅读
/
正在检测是否收录...
08/10
[email protected]:/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
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/

解决

pythonpip
朗读
赞(0)
赞赏
感谢您的支持,我会继续努力哒!

三合一收款

下面三种方式都支持哦

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

一个梦想 | A Dream

本文链接:

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

评论 (0)