Use uv (Experimental)#
Tip
Added in 2.19.0.
PDM has experimental support for uv as the resolver and installer. To enable it:
1 | |
PDM will automatically detect the uv binary on your system. You need to install uv first. See uv's installation guide for more details.
Reuse the Python installations of uv#
uv also supports installing Python interpreters. To avoid overhead, you can configure PDM to reuse the Python installations of uv by:
1 | |
Limitations#
Despite the significant performance improvements brought by uv, it is important to note the following limitations:
- The cache files are stored in uv's own cache directory, and you have to use
uvcommand to manage them. - PEP 582 local packages layout is not supported.
inherit_metadatalock strategy is not supported by uv. This will be ignored when writing to the lock file.- Update strategies other than
allandreuseare not supported. - Editable requirement must be a local path. Requirements like
-e git+<git_url>are not supported. excludessettings under[tool.pdm.resolution]are not supported.- Cross-platform lock targets are not needed by uv resolver, uv always generates universal lock files.
include_packagesandexclude_packagessettings under[tool.pdm.source]are not supported.