python
install_error
ai_generated
true
错误:子进程以错误退出 × python setup.py egg_info 未成功运行。 │ 退出码:1 ╰─> [8 行输出] 文件 "setup.py",第 5 行 print "Hello" ^ SyntaxError:调用 'print' 时缺少括号
error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [8 lines of output] File "setup.py", line 5 print "Hello" ^ SyntaxError: Missing parentheses in call to 'print'
ID: python/pip-egg-info-failed-invalid-syntax
80%修复率
86%置信度
0证据数
2024-01-15首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
根因分析
包的 setup.py 使用 Python 2 语法,与 Python 3 不兼容。
English
The package's setup.py uses Python 2 syntax, incompatible with Python 3.
解决方案
-
90% 成功率
Find a newer version of the package that supports Python 3.
-
70% 成功率
Use `2to3` to convert setup.py, then install with `--no-build-isolation`.
无效尝试
常见但无效的做法:
-
90% 失败
Python 2 is EOL and may not be available.
-
60% 失败
May be overwritten on next install; not sustainable.