Using built-in uv environment creation does not seem to respect .python-version file #16392
Unanswered
Santoshjnawali
asked this question in
Feedback
Replies: 1 comment
|
Thank you for this report! 🙌 I opened #16402 for us to handle this mixed-dependency-file situation better than we do right now. Please feel free to add any additional info if I missed anything! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
When a project contains both a pyproject.toml and a .python-version file, Positron's built-in notification to create a Python virtual environment does not appear to respect the Python version specified in .python-version.
Reproducing issue :
Create a new project directory:
my-project/
├── .python-version
└── requirements.txt
└── pyproject.toml
Add a Python version to .python-version, for example:
3.13
Add python requirement to pyproject.toml
requires-python = ">=3.10"
Open the folder in Positron.
Use the built-in Positron notification/prompt to create a virtual environment.
Check the Python version of the created environment.
It uses the latest python version
Workaround:
skipping built in notification and running uv sync in terminal works and creates venv with 3.13.X
All reactions