code

Python packages

pip is old school! uv is faster and more convenient.

Here’s a quick-start guide:

  1. Install uv:
  2. Navigate to a new folder for your project
  3. Run uv init to initiate the project folder
  4. Run uv add package1 package2 ... to install packages and automatically update the requirements
  5. Run a file wih uv run filename.py

Or, if you have code with a pyproject.toml that you want to set up and run,

  1. Download the repository and navigate to it
  2. Run uv sync

That’s it! No more messing around with venv and requirement.txts, and wrangling dependencies, and waiting for ten minutes for everything to install. It’s fast enough that you can spin up an entire version of Python for a single script.

Note the following:

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!