-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Closed
Copy link
Labels
bugSomething isn't workingSomething isn't working
Description
Description:
After changing the Python version from 3.14t (Free threaded python) to 3.14 using uv python pin, uv sync does not remove the old virtual environment or create a new one with the updated Python version.
Steps to Reproduce:
PS D:\Dhaval-WebDev\Test\venus> cat .python-version
3.14t
PS D:\Dhaval-WebDev\Test\venus> uv sync
Using CPython 3.14.0
Creating virtual environment at: .venv
Resolved 1 package in 83ms
Audited in 0.01ms
PS D:\Dhaval-WebDev\Test\venus> uv run python
Python 3.14.0 free-threading build (main, Oct 10 2025, 12:50:21) [MSC v.1944 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.base_prefix
'C:\\Users\\DHAVAL\\AppData\\Roaming\\uv\\python\\cpython-3.14.0+freethreaded-windows-x86_64-none'
>>> sys.prefix
'D:\\Dhaval-WebDev\\Test\\venus\\.venv'
PS D:\Dhaval-WebDev\Test\venus> uv python pin 3.14
Updated `.python-version` from `3.14t` -> `3.14`
PS D:\Dhaval-WebDev\Test\venus> cat .python-version
3.14
PS D:\Dhaval-WebDev\Test\venus> uv sync
Resolved 1 package in 2ms
Audited in 0.01ms
PS D:\Dhaval-WebDev\Test\venus> uv run python
Python 3.14.0 free-threading build (main, Oct 10 2025, 12:50:21) [MSC v.1944 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.base_prefix
'C:\\Users\\DHAVAL\\AppData\\Roaming\\uv\\python\\cpython-3.14.0+freethreaded-windows-x86_64-none'
>>> sys.prefix
'D:\\Dhaval-WebDev\\Test\\venus\\.venv'Expected Behavior:
After changing the Python version from 3.14t (Free-threaded Python) to 3.14 using uv python pin, uv sync should:
- Remove the old virtual environment created with
3.14t. - Create a new virtual environment
.venvusing Python3.14.
Actual Behavior:
uv sync doesn't do anything; it thinks everything is up to date.
Extra Context:
If we manually delete the .venv and then run uv sync, it correctly creates a new virtual environment using the updated .python-version → 3.14.
At that time, there are no issues.
Platform
Microsoft Windows 11 Home Single Language
Version
uv 0.9.2 (141369c 2025-10-10)
Python version
Python 3.14.0
ZuidVolt, m0g1cian, M0gician and zamanhZuidVolt
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working