Making pip installs a little less slow
Installing your Python application’s dependencies can be surprisingly slow.
Whether you’re running tests in CI, building a Docker image, or installing an application, downloading and installing dependencies can take a while.
So how do you speed up installation with pip
?
In this article I’ll cover:
- Avoiding the slow path of installing from source.
pip
download speed, and the alternatives: Pipenv and Poetry.- A useful
pip
option that can, sometimes, speed up installation significantly.
Avoiding installs from source
When you install a Python package, there are two ways you can install it, typically:
- The packaged up source file, often a
.tar.gz
with asetup.py
.
In this case, installing will often require running Python code (a little slow), and