Migrate to uv

0.12.0 · active · verified Fri Apr 17

migrate-to-uv is a command-line tool designed to help users transition their Python projects from traditional package managers like Poetry, Pipenv, or pip to `uv`'s `pyproject.toml` format. It aims to automate the conversion of project metadata, dependencies, and build configurations to be compatible with `uv`. The current version is 0.12.0, with new releases occurring regularly, often weekly or bi-weekly, to introduce features and address bugs.

Common errors

Warnings

Install

Quickstart

This quickstart demonstrates migrating a simple Poetry project to be compatible with `uv`'s `pyproject.toml` standards. It sets up a basic Poetry project, adds some dependencies, and then uses `migrate-to-uv` to convert its configuration. After migration, you would typically use `uv sync` to install dependencies.

# Create a dummy Poetry project
mkdir my-poetry-project
cd my-poetry-project
poetry init -n # Initialize without interaction
poetry add requests
poetry add black --group dev

# Migrate the project to uv's pyproject.toml format
migrate-to-uv

# You can now remove poetry related files
rm poetry.lock pyproject.toml

# If you check pyproject.toml, it should be updated for uv
# You can then install dependencies with uv
# uv sync

# And run with uv
# uv run python -c "import requests; print(requests.__version__)"

view raw JSON →