python install_error ai_generated true

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

Also available as: JSON · Markdown · 中文
80%Fix Rate
86%Confidence
0Evidence
2024-01-15First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
3.8 active — — —
3.9 active — — —
3.10 active — — —
3.11 active — — —

Root Cause

The package's setup.py uses Python 2 syntax, incompatible with Python 3.

generic

中文

包的 setup.py 使用 Python 2 语法,与 Python 3 不兼容。

Workarounds

  1. 90% success
    Find a newer version of the package that supports Python 3.
  2. 70% success
    Use `2to3` to convert setup.py, then install with `--no-build-isolation`.

Dead Ends

Common approaches that don't work:

  1. 90% fail

    Python 2 is EOL and may not be available.

  2. 60% fail

    May be overwritten on next install; not sustainable.