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

Warn when using uv with an incompatible Python version. #2587

Closed
MichaReiser opened this issue Mar 21, 2024 · 2 comments · Fixed by #3250
Closed

Warn when using uv with an incompatible Python version. #2587

MichaReiser opened this issue Mar 21, 2024 · 2 comments · Fixed by #3250
Labels
error messages Messaging when something goes wrong good first issue Good for newcomers

Comments

@MichaReiser
Copy link
Member

uv only supports Python 3.8 or newer. However, that's not very obvious from our documentation (you need to scroll all the way down to platform support) and some or even most functionality works fine, even when using uv with a Python version older than 3.8, e.g. the Python discovery works fine and uv only fails to run scripts (#2445).

uv should print a warning message when creating a virtual env or installing into a global Python environment when Python is older than 3.8 to make users aware that their platform isn't officially supported.

@MichaReiser MichaReiser added the error messages Messaging when something goes wrong label Mar 21, 2024
@charliermarsh
Copy link
Member

In our defense, it's also at the very top of the repo:

Screenshot 2024-03-21 at 9 43 17 AM

@zanieb zanieb added the good first issue Good for newcomers label Mar 21, 2024
stegayet added a commit to stegayet/uv that referenced this issue Apr 1, 2024
stegayet added a commit to stegayet/uv that referenced this issue Apr 1, 2024
stegayet added a commit to stegayet/uv that referenced this issue Apr 1, 2024
stegayet added a commit to stegayet/uv that referenced this issue Apr 1, 2024
stegayet added a commit to stegayet/uv that referenced this issue Apr 1, 2024
@henryiii
Copy link
Contributor

henryiii commented Apr 2, 2024

FYI, everything except Windows scripts seems to work fine with 3.7. I'm guessing I should be skipping 3.7 too then in pypa/manylinux#1590. Edit: Oh, if it's only a warning, probably okay.

zanieb added a commit that referenced this issue Apr 24, 2024
zanieb added a commit that referenced this issue Apr 24, 2024
…ed Python version

Closes #2587.

Co-authored-by: Stevie Gayet <stegayet@users.noreply.github.com>
zanieb added a commit that referenced this issue Apr 24, 2024
I rebased #2757 then realized that
we want to implement this for more than `uv venv`.

Closes #2587
Closes #2757

```
❯ cargo run -q -- pip install -p /Users/mz/bin/python3.7 anyio
warning: uv is only compatible with Python 3.8+, found Python 3.7.17.
Audited 1 package in 84ms

❯ cargo run -q -- venv -p /Users/mz/bin/python3.7
warning: uv is only compatible with Python 3.8+, found Python 3.7.17.
Using Python 3.7.17 interpreter at: /Users/mz/bin/python3.7
Creating virtualenv at: .venv
Activate with: source .venv/bin/activate
```

---------

Co-authored-by: Stevie Gayet <stegayet@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error messages Messaging when something goes wrong good first issue Good for newcomers
Projects
None yet
4 participants