Use Rust’s Speed to Install Python Libraries Up to 100 Times Faster | by Eryk Lewinson | Mar, 2024

Editor
2 Min Read


A Quick overview of uv — the new kid on the block of Python package managers

For data scientists and Python programmers, pip needs no introduction. As a package manager, it is either the go-to solution or the starting point in our search for the best solution out there.

Trivia alert 🚨: While pip doesn’t require an introduction, I have only just learned that it actually stands for “Pip Installs Packages” or “Preferred Installer Program”.

pip is not the only package manager available. Below, you can find the most popular tools on the market:

  • pip — the standard package manager for Python, which also comes preinstalled with Python.
  • conda — a package and environment management system designed specifically for data science. Besides Python, it can also install packages written in other languages (for example, R).
  • poetry — it aims to simplify Python dependency management by providing features such as efficient dependency resolution and virtual environments.
  • pipenv — this tool combines pip for package installation with virtualenv for creating isolated environments.

And as this XKCD comic illustrates, there is always room for a new joiner!

Today, we’ll look into uv, which boasts being over 100 times faster than pip. uv functions as a Python package installer, virtual environment creator and a resolver. To achieve its blazing speed, it was built in Rust. Additionally, it was designed as a drop-in replacement for pip and pip-tools workflows.

That sounds promising! Before putting it to the test, let’s briefly briefly touch upon the difference between an installer and resolver:

  • package installers (e.g., pip) are used to install, update, and remove Python packages from our environment.
  • package resolvers (e.g., pip-tools) ensure the consistency and reproducibility of dependencies by generating precise lists and resolving version conflicts.

Before we dive into testing, it is worth mentioning that I am conducting the tests on an M1 Mac Mini. And a general disclaimer…

Share this Article
Please enter CoinGecko Free Api Key to get this plugin works.