Ericsson Cognitive Labs

Python Packaging Needs a Speed Revolution

pip vs poetry vs uv

Over the past decade, Python’s packaging ecosystem has undergone a remarkable transformation — one that has been both confusing and exciting for developers. From the early days of pip to the structured reliability of Poetry, and now the lightning-fast innovation of uv, developers have navigated a fragmented yet steadily improving landscape. This blog post traces that journey, highlighting the motivations, missteps, and milestones that shaped the tools we use today. Whether you’re a seasoned developer or just starting out, understanding this evolution helps clarify the tooling chaos — and makes it easier to choose the right tool for your next project.

The Evolution of Python Packaging

The timeline below visually maps out this journey, showcasing when major tools emerged and how they influenced one another.

Timeline: pip to uv

Timeline of major packaging tools and their influence.

  1. The Early Days:
    For years, pip1 has been the default tool every Python developer learns first. It’s reliable, ubiquitous, and works across nearly every environment. But it’s also relatively low-level: you often need to combine it with virtual environments (venv or virtualenv) and dependency trackers like pip-tools to create a full project workflow.

    🧰 Think of pip as the “do-it-yourself” toolbox — flexible, but you bring the glue.

  2. The pipenv Moment:
    An early attempt to unify environments and dependencies. While promising, it was often slow and confusing in real-world use — and never became the standard.

  3. Poetry Arrives: Structure and Simplicity
    Poetry2 introduced a higher level of abstraction. It brought in a clear project structure (pyproject.toml)3, semantic versioning, and dependency resolution with lockfiles — all while abstracting away virtual environments. It appeals to developers who want opinionated defaults and consistency without stitching together multiple tools.

    🛠 Poetry is the all-in-one power drill: batteries included, and it just works.

  4. Enter uv: The Speed-Focused Contender
    Built in Rust, uv4 reimagines Python tooling for the modern era. It’s blazing fast, offers drop-in replacements for pip and virtualenv, and aligns closely with pyproject.toml standards. It’s also the backend for Rye, which aims to be a Poetry-style toolchain — but even faster.

    🏎️ uv is like switching from a toolbox to a Formula 1 pit crew. Speed is the selling point.

💡 Curious about Python packaging trends? Follow PyCon, PyPA, EuroPython, and more — the key hubs shaping Python’s packaging future.


Core Workflows: Installation & Virtual Environment Management

Installing dependencies and managing virtual environments are at the core of every Python project5. These isolated setups contain their own Python interpreter and installed packages, helping avoid conflicts and ensuring reproducibility. Let’s explore how the three major tools — pip, Poetry, and uv — approach these workflows.

Pip Workflow

Having already introduced pip, let’s now walk through how it fits into core workflows — particularly when managing virtual environments and installing dependencies. While pip installs packages into the currently active environment, it does not create or manage virtual environments by itself. To isolate dependencies, it’s best to use Python’s built-in venv module alongside pip.

# Create a virtual environment
python3 -m venv .venv

# Activate it
# macOS/Linux:
source .venv/bin/activate
# Windows:
.venv\Scripts\activate

# Then install packages
pip install <package>

Always run pip commands inside a virtual environment for better isolation and reproducibility.

Pip — Setup, Usage, and Dependency Management

# Check pip version
pip --version

# OR (more reliable)
python -m pip --version

# Install a package
pip install requests

# Install a specific version
pip install "requests==2.18.4"

# Install from requirements.txt
pip install -r requirements.txt

# Upgrade a package
pip install --upgrade requests

# Uninstall a package
pip uninstall requests

# Export current dependencies
pip freeze > requirements.txt

Poetry Workflow

Poetry simplifies dependency management and packaging by using pyproject.toml as the single source of truth. Unlike pip, Poetry automatically manages a virtual environment for our project. When we run poetry install or poetry add, it:

We can configure Poetry to store the virtual environment inside the project directory (rather than in the global cache) by updating config:

[virtualenvs]
in-project = true

To activate the environment manually:

poetry shell

Use poetry run to execute scripts inside the managed environment.

Poetry — Setup, Usage, and Dependency Management

# Install Poetry (recommended way)
pipx install poetry

# Or use the official install script
curl -sSL https://install.python-poetry.org | python3 -

# Create a new project
poetry new my_project
cd my_project

# OR initialize Poetry in an existing project (creates pyproject.toml)
poetry init

# Add dependencies
poetry add requests

# Install dependencies (from pyproject.toml)
poetry install

# Update all dependencies
poetry update

# Remove a dependency
poetry remove requests

# Run a script inside Poetry’s virtual environment
poetry run python app.py

# Export dependencies to requirements.txt (if needed)
poetry export -f requirements.txt --output requirements.txt

UV Workflow

uv is like swapping your toolbox for a pit crew — built in Rust, lightning-fast, and fully automated. It doesn’t just install packages; it builds your whole environment in record time. Let’s now look at how uv fits into the core workflows of installing dependencies and managing virtual environments. uv combines both tasks into a single streamlined interface — automatically creating virtual environments, resolving dependencies, and managing packages via pyproject.toml.

UV — Setup, Usage, and Dependency Management

# Install UV
pip install uv

# OR (macOS/Linux)
brew install astral-sh/uv/uv

# Initialize a new project (adds pyproject.toml)
mkdir my-uv-project
cd my-uv-project
uv init

# Create a virtual environment
uv venv

# Add and install a package (e.g., requests)
uv add requests

# Install a package manually (pip-style)
uv pip install another-package

# Install from requirements file
uv pip install -r requirements.txt

# Freeze dependencies (like pip-tools)
uv pip compile pyproject.toml -o requirements.txt

# Sync environment from lock file
uv pip sync requirements.txt

# Remove a package
uv remove requests

# Run script within the virtual environment
uv run python my_script.py

Use uv run to execute commands inside uv’s managed environment.

Python Packaging: The Benchmark Battle

Choosing the right Python tool for dependency management can drastically impact the development speed6. We benchmarked three popular tools — pip, Poetry, and uv — to measure their performance for:

Key Questions

⚙️ Experimental Setup:

- Python Version: 3.8+
- OS: Linux
- CPU: 7 cores
- Memory: 15 GB
- Platform: Kubeflow notebook pod

“Times may vary slightly based on network speed and package cache state”.

- pip (with venv)
- Poetry (with in-project virtualenv)
- uv (using its internal virtualenv and pip-like install flow)
- Light: numpy==1.24.4, pandas==1.5.3, scikit-learn==1.1.3  
- Heavy: torch==1.13.1
- Clean install per run (--no-cache-dir, --force-reinstall)
- 3 iterations per tool
- Timing via time.time()
- Virtualenv removed after each run

Benchmark: pip vs poetry vs uv (Env + Packages Install Time)

📊 Here’s what we found:

💡 “Using uv for the first time feels like switching the project to SSD after years on a spinning disk.”

Beyond Speed: CLI Usability & Developer Experience

Different tools offer different trade-offs in terms of usability and feature completeness7. Here’s a quick comparison of pip, Poetry, and uv from a command-line experience perspective:

Feature pip Poetry uv Comment
Dependency resolution Manual (or pip-tools) Built-in Faster, smarter uv is Rust-based and significantly faster
Virtual env support Manual (venv) Auto-managed Explicit & fast Poetry creates & manages venvs automatically; uv expects external management or activation
Lock file support requirements.txt only poetry.lock uv.lock pip lacks native lock file format
pyproject.toml support Partial (via PEP 517/518) Native ([tool.poetry]) Flexible ([project], [tool.poetry]) pip reads PEP 517 build systems but doesn’t manage them
Publishing to PyPI Use twine Built-in Now supported uv publish is available as of 2024 (experimental, but working)
Editable install (-e .) Yes Yes Yes All three support editable installs

💡 Key Takeaway
If we are looking for an opinionated all-in-one tool, Poetry is great.
If we want speed with modularity, uv is compelling.

When to Use Which?

Each tool shines in different situations. Here’s a quick guide to help choose the right one depending on your needs:

Scenario Best Tool Why
Easier to learn Poetry Built-in support for dependency resolution, virtualenv, and packaging
Super-fast installs in CI or dev uv Significantly faster env creation & installs (5x–10x faster than pip)
Combining best of both worlds uv Handles fast installs, packaging, and PyPI publishing – all-in-one
Virtual environment creation uv Fast and supports multiple isolated envs with ease
Familiar workflow & legacy compatibility pip Universal and works with any Python project

Who Benefits the Most from uv?

The transition to modern Python dependency management tools like uv isn’t just about speed — it’s about empowering specific groups to work more efficiently and effectively. Here’s who stands to gain the most:

1. Data Scientists and Machine Learning Engineers

Benefit: Rapid environment setup and reproducibility

Data professionals often need to create and manage multiple environments for experiments. uv’s lightning-fast environment creation and package installation streamline this process, allowing for more experiments in less time.

“UV combines environment creation and package management in a single tool, streamlining the workflow.”
DataCamp Tutorial on uv

2. CI/CD Engineers & DevOps Teams

Benefit: Significantly reduced CI/CD pipeline times

In continuous integration and deployment workflows, time is critical. uv’s performance can drastically cut down the time required for dependency installation, leading to faster build and deployment processes.

“UV’s performance shines brightest in automation pipelines, where every second counts.”Introducing uv: Next-Gen Python Package Manager

3. Open-Source Maintainers

Benefit: Simplified dependency management and contributor onboarding

Maintainers juggling multiple projects and contributors can benefit from uv’s deterministic resolution and seamless integration, making it easier to manage dependencies and onboard new contributors.

“UV’s standards-compliant virtual environments work seamlessly with other tools, avoiding lock-in or customization.”
uv GitHub Repository

Popularity & Community Adoption

To complement the performance and feature comparison, let’s look at real-world developer interest using Google search data8:

Google Trends for pip vs poetry vs uv

As the chart shows:

So… Which One Should You Bet On?

Whether we’re accelerating machine learning experiments, streamlining CI/CD pipelines, maintaining open-source projects, teaching the next generation of developers, or building core Python infrastructure — uv offers a modern, efficient solution for dependency management.

It embodies the best of both worlds: the flexibility of pip, the structured reliability of Poetry, and the performance of a Rust-powered engine — reflecting a Python community continually evolving toward a smoother developer experience.

Each generation of packaging tools has pushed toward greater developer empowerment:

While the Python packaging ecosystem is still influenced by specific design choices and continues to evolve, it is now more cohesive, efficient, and developer-friendly than ever.

Choosing the right tool today involves more than just looking at features — it also requires an understanding of the journey that led us here and a focus on clarity rather than disruption in our development process9.


What’s your current Python stack? Have you tried uv yet?


🛠️ Want to try it yourself?
👉 Explore the benchmark code on GitHub – coming soon!


  1. The Python Packaging Authority (PyPA) maintains pip, the de facto standard Python package installer. Its official documentation covers CLI usage, dependency resolution, caching mechanisms, and internals. 

  2. Poetry is a popular Python packaging and dependency management tool focused on ease of use and reproducibility. Its official site provides documentation and installation instructions at python-poetry.org

  3. PEP 621 defines the standard for project metadata in pyproject.toml, which is relevant for modern Python package managers such as Poetry and uv. See PEP 621

  4. uv is a next-generation Python package manager designed for speed and efficiency, significantly outperforming pip and Poetry in installation times. See the uv GitHub repo for details. 

  5. The Python Packaging User Guide is the canonical resource for all Python packaging tools and standards, including pip, Poetry, setuptools, pyproject.toml, and best practices. 

  6. Performance comparisons among pip, Poetry, and uv show that uv achieves installation speeds 10× to 100× faster, as documented in Astral’s benchmark reports at uv benchmarks

  7. The Python Packaging Ecosystem Talk from PyCon provides simple guidelines and perspectives on choosing packaging tools and managing workflows involving pip, Poetry, and other modern Python package managers. In parallel, as noted by McKinsey Digital’s From box to cloud: How to drive agile software and DevOps productivity, agile delivery models and DevOps transformations can dramatically accelerate productivity — much like how modern Python packaging tools streamline environment setup, dependency resolution, and deployment for faster, more reliable development workflows. 

  8. Community discussions about pip, pipx, Poetry, and uv in real-world workflows—including Docker, CI pipelines, and production environments—can be explored through their active GitHub issue trackers: pip, pipx, Poetry, and uv

  9. Brett Cannon’s interview “Why Python Packaging is Hard” explores the historical and architectural reasons behind Python packaging complexity and tool fragmentation. Read it at pydevtools.com

Previous post
Framework-Agnostic Libraries are needed