Skip to content

Supported package managers

migrate-to-uv supports multiple package managers. By default, it tries to auto-detect the package manager based on the files (and their content) used by the package managers it supports. If you need to enforce a specific package manager to be used, use --package-manager.

Poetry

All existing Poetry metadata should be converted to uv when performing the migration:

Version definitions set for dependencies are also preserved, and converted to their equivalent PEP 440 format used by uv, even for Poetry-specific version specification (e.g., caret (^) and tilde (~)).

Build backend

As uv does not yet have a stable build backend (see astral-sh/uv#8779 for more details), when performing the migration for libraries, migrate-to-uv sets Hatch as a build backend, migrating:

Note

Path rewriting, defined with to in packages for Poetry, is also migrated to Hatch by defining sources in wheel target.

Once uv build backend is out of preview and considered stable, it will be used for the migration.

Pipenv

All existing Pipenv metadata should be converted to uv when performing the migration:

pip-tools

Most pip-tools metadata is converted to uv when performing the migration.

By default, migrate-to-uv will search for:

  • production dependencies in requirements.in
  • development dependencies in requirements-dev.in

If your project uses different file names, or defines production and/or development dependencies across multiple files, you can specify the names of the files using --requirements-file and --dev-requirements-file (both can be specified multiple times), for instance:

migrate-to-uv \
  --requirements-file requirements-prod.in \
  --dev-requirements-file requirements-dev.in \
  --dev-requirements-file requirements-docs.in

Missing features

  • Dependencies that do not follow PEP 508 specification are not yet handled
  • References to other requirement files (e.g., -r other-requirements.in) are not supported, but the requirements file can manually be set with --requirements-file or --dev-requirements-file
  • Index URLs are not yet migrated

pip

Most pip metadata is converted to uv when performing the migration.

By default, migrate-to-uv will search for:

  • production dependencies in requirements.txt
  • development dependencies in requirements-dev.txt

If your project uses different file names, or defines production and/or development dependencies across multiple files, you can specify the names of the files --requirements-file and --dev-requirements-file (both can be specified multiple times), for instance:

migrate-to-uv \
  --requirements-file requirements-prod.txt \
  --dev-requirements-file requirements-dev.txt \
  --dev-requirements-file requirements-docs.txt

Missing features

  • Dependencies that do not follow PEP 508 specification are not yet handled
  • References to other requirement files (e.g., -r other-requirements.txt) are not supported, but the requirements file can manually be set with --requirements-file or --dev-requirements-file
  • Index URLs are not yet migrated