Compare

uv vs pip: I Timed Both on the Same 49 Packages

November 24, 2026
uv
Open Source
VS
pip
Open Source

Pick uv if

You install Python packages often and want it to be fast, especially in CI and Docker builds.

Pick pip if

You want the installer that already comes with Python and nothing new to learn.

uv vs pip: I Timed Both on the Same 49 Packages

I installed the same 49 pinned packages with both, in the same container. On defaults, uv's cached install took 0.33 seconds against pip's 23. Most of that gap comes from one setting: uv skips compiling Python files at install time. With that turned on to match pip, uv still won, at 12.9 seconds, about 1.8 times faster. The raw results and scripts are linked under "How I tested".

Bar chart in seconds on a log scale. Cached install: uv default 0.33 s, uv with --compile-bytecode 13 s, pip 23 s. Install from scratch: uv 105 s, uv with --compile-bytecode 82 s, pip 155 s. Resolve versions: uv 0.03 s, pip 4.67 s. Create a virtual environment: uv 0.01 s, pip 3.05 s.
Medians for the same 49 packages. The blue bar is the fair cached-install comparison.

That one setting matters because most uv vs pip comparisons quote the default number and stop there. If you only read one section of this page, read the next one.

uv vs pip at a glance

uv 0.13.9pip 26.3
What it is"An extremely fast Python package and project manager, written in Rust""the package installer for Python"
Comes with PythonNo, install it onceYes, "included by default with the Python binary installers"
LicenceApache 2.0 or MITMIT
Compiles .pyc files at installNo, unless you askYes
Also doesVirtual environments, lockfiles, Python versionsInstalling packages

Is uv really 70 times faster than pip?

Only on its defaults, and here is why. When pip installs a package, it also compiles every Python file into bytecode, the .pyc files Python loads on import. uv does not. In its own words: "By default, uv does not compile Python (.py) files to bytecode (__pycache__/*.pyc); instead, compilation is performed lazily the first time a module is imported."

So the default uv install skips work that pip does, and your program does that work later, the first time it imports each module. You can see it in the size of the result: pip's environment came to 377 MB, uv's default one to 280 MB, and uv with --compile-bytecode to the same 377 MB as pip.

Cached install, same 49 packagesTime (median of 5)Environment size
pip23.2 s377 MB
uv, with --compile-bytecode12.9 s377 MB
uv, defaults0.33 s280 MB

Here is the same thing in a terminal, one run of each:

Terminal: pip 26.3, then time pip install -r requirements.txt with a warm cache takes 32.2 seconds real time.
pip compiles bytecode as it installs.
Terminal: uv 0.13.9. time uv pip install -r requirements.txt takes 0.715 seconds. time uv pip install --compile-bytecode -r requirements.txt takes 14.6 seconds.
uv on defaults, then uv doing the same compile work as pip.

Which number is right for you depends on where you install. On your laptop, the default is fine: the bytecode gets made once, the first time you run your code. For Docker images, uv's Docker guide says compiling bytecode "is typically desirable for production images as it tends to improve startup time", so turn it on there. That is the 12.9 second line, and it is still almost twice as fast as pip.

Is uv faster when nothing is cached?

Yes, but by much less. Installing from scratch means downloading every package, and both tools waited on the same internet connection:

Install with empty cachesMedian of 3Fastest and slowest run
pip155 s123 to 191 s
uv, defaults105 s54 to 118 s
uv, with --compile-bytecode82 s49 to 131 s

The runs swung by a minute or more, which is the network, not the tools. uv was faster than pip in each of the three rounds, by anything from 15% to 70%, but treat these as a rough guide. The cached numbers above are the reliable ones, because they take the network out.

What about environments and resolving versions?

These are where uv's lead is real and nothing is deferred:

  • Creating a virtual environment: 0.014 s with uv venv, against 3.05 s with python -m venv. Part of pip's time here is installing pip itself into the new environment, which uv venv does not do.
  • Resolving versions for the 12 unpinned packages behind the list, with warm caches: 0.027 s with uv pip compile, against 4.67 s for pip's dry run.

Both installers ended up with exactly the same 49 packages at the same versions. The only difference in their lists was spelling: pip writes PyYAML and typing_extensions, uv writes pyyaml and typing-extensions.

How I tested

  • Setup: one Docker image with both tools pinned (Python 3.13, pip 26.3, uv 0.13.9), limited to 2 CPUs and 4 GB, with environments and caches on the container's own disk.
  • Packages: a realistic web and data project, FastAPI, Uvicorn, pandas, NumPy, requests, HTTPX, SQLAlchemy, psycopg, Pydantic, boto3, pytest and Matplotlib, pinned to 49 exact versions.
  • Runs: 5 rounds for cached installs, resolving and environments, 3 for installs from scratch, with the tool that goes first swapped every round so network swings hit both. Medians.
  • Same targets: both installed into a fresh environment each time, pip through its --python option, so the only thing that changed was the installer.
  • What this test doesn't cover: uv's project workflow (uv sync, uv lock), private package indexes, Windows and macOS, and how long the first import takes after a default uv install.
  • What I threw away: my first run, because the laptop went to sleep in the middle of a download and one pip install took over 17 minutes. I also rebuilt one screenshot after noticing my setup had left uv's cache empty, which made uv look slow.

The raw numbers are in my results CSV, and the test script is here as plain text. Everything needed to rerun it is in my benchmark repo on GitHub.

Which should you choose?

  • CI pipelines and Docker builds: uv, with --compile-bytecode in images. Faster on every step I measured.
  • Day-to-day work on your own machine: uv's defaults are fine and feel instant once the cache is warm.
  • A quick one-off install, or a machine where you can't add tools: pip. It is already there.
  • Teaching beginners: pip, because it is what the Python docs and most tutorials use.

Changes to this page

  • Bench v1: first results, uv 0.13.9 and pip 26.3 on 49 packages, defaults plus uv with --compile-bytecode.

How we compare: prices, plans and features come from each product’s official site, pricing page or app store listing. See how we write.

Muhammad Mairaj
Muhammad Mairaj
Muhammad Mairaj is a Senior Backend Engineer with 8 years building payment and data systems. He tests software the way an engineer evaluates it. He is a Partner at Softstribe Solutions and a Senior Software Engineer (Backend) at Funavry Technologies in Islamabad, and he worked on payments at NayaPay.
More from Muhammad Mairaj