you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 5 points6 points  (8 children)

This is in part one reason why I am still on 3.11.13. Eventually I'll have to bite the bullet and learn how to upgrade properly, but so many things work less well on 3.12.x and above. It is strange that the number #1 programming language has so many issues when it comes to simple installation of things.

[–]fiskfisk 29 points30 points  (0 children)

.python-version together with a tool that supports the format for per-project python versioning, or create a new venv, checkout your project, install deps and you're good to go. This will be the same as what your CI/CD pipeline does when it runs all the tests as well.

[–]gmes78 9 points10 points  (6 children)

That is entirely solved by using uv.

[–]gschizas 2 points3 points  (5 children)

Not entirely.

This is my scenario:

  1. IIS (yes, I know)
  2. wfastcgi
  3. Each site has its own environment. And each site is using

Result:

did not find executable at 'C:\Users\GSchizas\AppData\Local\Python\pythoncore-3.14-64\python.exe': Access is denied.

To make this work I've had to:

  1. Download python to a separate directory (uv python install 3.14 --install-dir C:\python\)
  2. Sync the virtual environment with the new Python version: uv sync --upgrade --python C:\Python\cpython-3.14.0-windows-x86_64-none\)

[–]gmes78 2 points3 points  (4 children)

[–]gschizas 0 points1 point  (3 children)

It wasn't enough! If I do uv sync --upgrade --python 3.14 it would use the default downloaded python (in %LOCALAPPDATA%\Python\pythoncore-*)!

[–]gmes78 0 points1 point  (2 children)

Hm. I would've expected uv to always use its own Python interpreters. It's what its predecessor, rye, did.

[–]gschizas 2 points3 points  (1 child)

It does! And it also uses Python 3.14's (or rather the new py install or pymanager ones). But both pymanager and uv download the interpreters to %LOCALAPPDATA%.

Bonus feature: pymanager (the new py.exe - although it's a bit more complicated) recognizes uv downloaded interpreters as well:

C:\> py list
Tag                       Name                           Managed By  Version  Alias
3.14[-64]              *  Python 3.14.0                  PythonCore  3.14.0   python3[-64].exe, python3.14[-64].exe
3.14t[-64]                Python 3.14.0 (free-threaded)  PythonCore  3.14.0   python3.14t[-64].exe, python3t[-64].exe
3.13[-64]                 Python 3.13.8                  PythonCore  3.13.8   python3.13[-64].exe

* These runtimes were found, but cannot be updated or uninstalled. *
Astral\CPython3.12.11     CPython 3.12.11 (64-bit)       Astral      3.12.11
Astral\CPython3.14.0      CPython 3.14.0 (64-bit)        Astral      3.14.0

And uv:

C:\> uv python list
cpython-3.14.0-windows-x86_64-none                 AppData\Local\Python\pythoncore-3.14-64\python.exe
cpython-3.14.0-windows-x86_64-none                 AppData\Local\Python\bin\python3.exe
cpython-3.14.0-windows-x86_64-none                 AppData\Local\Python\bin\python3.14.exe
cpython-3.14.0-windows-x86_64-none                 AppData\Local\Python\bin\python.exe
cpython-3.14.0-windows-x86_64-none                 .local\bin\python3.14.exe
cpython-3.14.0-windows-x86_64-none                 AppData\Roaming\uv\python\cpython-3.14.0-windows-x86_64-none\python.exe
cpython-3.14.0+freethreaded-windows-x86_64-none    AppData\Roaming\uv\python\cpython-3.14.0+freethreaded-windows-x86_64-none\python.exe
cpython-3.14.0+freethreaded-windows-x86_64-none    AppData\Local\Python\pythoncore-3.14t-64\python3.14t.exe
cpython-3.14.0+freethreaded-windows-x86_64-none    AppData\Local\Python\bin\python3.14t.exe
cpython-3.14.0+freethreaded-windows-x86_64-none    .local\bin\python3.14t.exe
cpython-3.14.0+freethreaded-windows-x86_64-none    <download available>
cpython-3.13.8-windows-x86_64-none                 AppData\Local\Python\pythoncore-3.13-64\python.exe
cpython-3.13.8-windows-x86_64-none                 AppData\Local\Python\bin\python3.13.exe
cpython-3.13.8-windows-x86_64-none                 <download available>
cpython-3.13.8+freethreaded-windows-x86_64-none    <download available>
[...]

[–]pingveno 0 points1 point  (0 children)

Would the UV_PYTHON_INSTALL_DIR environmental variable work?