Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Python 3.10 compatibility #161

Closed
musicinmybrain opened this issue Dec 11, 2020 · 2 comments
Closed

Fix Python 3.10 compatibility #161

musicinmybrain opened this issue Dec 11, 2020 · 2 comments
Assignees

Comments

@musicinmybrain
Copy link

On Python 3.10, setup.py incorrectly raises RuntimeError('Python version 2.7 or 3.4+ is required.').

Instead of

py_version = platform.python_version_tuple()
if py_version < ('2', '7') or py_version[0] == '3' and py_version < ('3', '4'):
  raise RuntimeError('Python version 2.7 or 3.4+ is required.')

please consider a trivial change to

py_version = sys.version_info
if py_version < (2, 7) or py_version[0] == 3 and py_version < (3, 4):
  raise RuntimeError('Python version 2.7 or 3.4+ is required.')

in order to compare versions as numbers rather than strings.

@programmeddeath1
Copy link

pip install rasa on 3.10 python is still failing wih this error.
What is the possible workaround?

  Using cached absl-py-0.9.0.tar.gz (104 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-jpqgvzg2/absl-py_442e8f35b9964a6c91bedd5edb00519b/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.

@yilei
Copy link
Contributor

yilei commented Aug 25, 2022

Using cached absl-py-0.9.0.tar.gz (104 kB)

The issue was fixed in v0.12.0 and your log shows it's installing an older v0.9.0 version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants