Member-only story
UV — A Fast Alternative to Pip
Pip is a package-management system for Python. It gained popularity a few years ago, and it is probably the most popular Python package manager.
Lately, Astral introduced an extremely fast Python package management system called uv. uv uses global caching to avoid re-downloading the same files. Using uv is easy and its commands are consistent with pip.
Pip vs uv Speed Comparison
I tested uv’s performance and compared its performance against pip. The following packages were added to the requirements.txt, and two separate environments were created for pip and uv, and the packages were installed.
numpy
pandas
scikit-learn
matplotlib
seaborn
flask
jupyter
The results are shown below. In short, uv was about 2 times faster than pip.
Then I created two more environments and tried to install these packages to them using pip and uv respectively. This time, the differences in performance were much more dramatic. uv took only about 0.39 seconds to completely install all the packages listed above. This is about 96 times faster than pip. This is because uv uses caching aggressively and it doesn’t have to re-download package files each and every time.