Configure a uv environment
The uv tool makes Python development easier, reducing setup tasks for new projects and helping manage existing ones.
To use uv
in PyCharm, you need to install it on your machine and create a specific Python environment.
When you select uv
while creating a new Python project, PyCharm automatically generates a pyproject.toml file. This file specifies required packages, scripts, plugins, and URLs. See the pyproject guide to learn more about its structure and format.
note
Make sure you are working with PyCharm version 2024.3.2 or later.
Do one of the following:
Click the Python Interpreter selector and choose Add New Interpreter.
Press CtrlAlt0S to open Settings and go to Project: <project name> | Python Interpreter. Click the Add Interpreter link next to the list of the available interpreters.
Click the Python Interpreter selector and choose Interpreter Settings. Click the Add Interpreter link next to the list of the available interpreters.
Select Add Local Interpreter.
Select uv from the list of environment types.
Select the base interpreter from the list, or click and find the Python executable in your file system.
Normally, PyCharm will detect uv installation.
Otherwise, specify the location of the uv executable, or click to browse for it.
Click OK to complete the task.
For any of the configured Python interpreters (but Docker-based), you can:
Thanks for your feedback!