
[英]RuntimeError: Python version >= 3.5 required while installing the python libraries
[英]RuntimeError: Python version 2.7 or 3.4+ is required even if I already have 3.10.6 version
我正在按照 Ubuntu 22.04 上LabelPC 的 GitHub 页面中的指南中的说明运行安装程序,但出现以下错误:
Collecting absl-py==0.8.0
Using cached absl-py-0.8.0.tar.gz (102 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-_yo1tcdy/absl-py_761c46388aa14bfaac46b6c57352037a/setup.py", line 34, in <module>
raise RuntimeError('Python version 2.7 or 3.4+ is required.')
RuntimeError: Python version 2.7 or 3.4+ is required.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
我不知道如何修复它,因为所有内容都已更新。 我的Python版本是3.10.6
这是abseil-py
中的错误。 Release 0.8 以这种方式进行 Python 版本比较。 该比较对于 Python 3.9 及以下的版本工作得很好,但在 3.10+ 时失败了。 当py_version
为('3', '10')
时,比较返回False
因为在 Python 中'10'
小于'4'
; 对于字符串 Python 比较'1'
和'4'
。 (整数10
当然是 > 4
)。
该错误已在提交d61b0b6中修复。 不幸的是labelpc
需要准确的 0.8 版本。 这意味着现在 abseil abseil-py
和labelpc
可以与 Python 2.7 和 3.5-3.9 一起使用,但不能与 3.10+ 一起使用。
使用 Python 3.9 并报告错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.