You install one package and suddenly a compiler is running, pages of output scroll by, and it ends in an error about a missing header file. pip found no ready made wheel for your system and tried to build from source.
You can forbid that:
python3 -m pip install --only-binary=:all: numpy
Now pip only considers wheels. If the newest release has none for your Python and platform, it may pick an older one that does, and if there is nothing at all you get a short “no matching distribution” error. I would take that over ten minutes of compiling that ends the same way.
Instead of :all: you can name packages, separated by commas:
python3 -m pip install --only-binary=numpy,pillow -r requirements.txt
It’s also a small safety net, since building from source runs code from the package on your machine during the install.
Not everything publishes wheels. Some small packages ship only a source archive and will now fail even though building them would have been painless. Name the troublesome packages in that case. And if pip quietly settles on an old version, check which one got installed before you trust it.
Further reading: pip install