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

uv run fails on centos 7 #3371

Closed
konstin opened this issue May 4, 2024 · 3 comments · Fixed by #3398
Closed

uv run fails on centos 7 #3371

konstin opened this issue May 4, 2024 · 3 comments · Fixed by #3398
Assignees
Labels
bug Something isn't working error messages Messaging when something goes wrong

Comments

@konstin
Copy link
Member

konstin commented May 4, 2024

We need to exit early if the python version is lower than 3.7.

$ uv run
warning: `uv run` is experimental and may change without warning.
error: Querying Python at `/usr/bin/python3` failed with status exit status: 1 with exit status: 1
--- stdout:

--- stderr:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/user/.cache/uv/.tmp9nBPgP/python/get_interpreter_info.py", line 536, in main
    "platform": get_operating_system_and_architecture(),
  File "/home/user/.cache/uv/.tmp9nBPgP/python/get_interpreter_info.py", line 439, in get_operating_system_and_architecture
    from .packaging._manylinux import _get_glibc_version
  File "/home/user/.cache/uv/.tmp9nBPgP/python/packaging/_manylinux.py", line 1
    from __future__ import annotations
    ^
SyntaxError: future feature annotations is not defined
---

/usr/bin/python3 --version: Python 3.6.8

@konstin konstin added the bug Something isn't working label May 4, 2024
@zanieb zanieb self-assigned this May 4, 2024
@charliermarsh
Copy link
Member

Not really sure what the right behavior is here -- just a better error message?

@zanieb
Copy link
Member

zanieb commented May 4, 2024

Yeah I think interpreter queries should fail with a better error message.

@zanieb zanieb added the error messages Messaging when something goes wrong label May 4, 2024
@samypr100
Copy link
Collaborator

Note Centos 7 will be EOL soon (June 2024)
To install modern versions of python on it I've had resort to building from source.

hauntsaninja added a commit to hauntsaninja/uv that referenced this issue May 6, 2024
Fixes astral-sh#3371

It seems like uv doesn't proactively enforce 3.8+ and in most cases just
issues a warning. This PR keeps that property, only adding the new check
when it is known to fail.
konstin pushed a commit that referenced this issue May 6, 2024
Fixes #3371

It seems like uv doesn't proactively enforce 3.8+ and in most cases just
issues a warning. This PR keeps that property, only adding the new check
when it is known to fail. I checked the imports in this file and the
other ones seem fine.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working error messages Messaging when something goes wrong
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants