pip
is old school! uv
is faster and more convenient.
Here’s a quick-start guide:
uv
:pip install uv
(not recommended)uv init
to initiate the project folderuv add package1 package2 ...
to install packages and automatically update the requirementsuv run filename.py
Note the following:
uv
automatically creates and maintains a pyproject.toml
, which is a modern version of requirements.txt
that includes versioning, Python version, and more information for greater reproducibilityuv
also automatically creates a virtual environment and activates it for useuv
creates a lockfile
that ensures cross-platform reproducibility!This way, you never need to use pip
or virtualenv
or other tools: everything is handled consistently with uv
.
You can also use a specific version of Python for each project!