Skip to content

uv does not distinguish between 3.14 and 3.14t while creating virtual environment #16253

@DhavalGojiya

Description

@DhavalGojiya

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:

  1. Remove the old virtual environment created with 3.14t.
  2. Create a new virtual environment .venv using Python 3.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-version3.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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions