I'm running into an issue with pip install --no-deps --no-build-isolation -r requirements.txt that I would not expect.
As a way of working around Python dependency hell using pip (the use of other package managers, e.g., poetry, are longer-term projects), we want to freeze our dependencies and install the exact versions of various packages we need.
In the list of dependencies includes:
fastparquet==0.4.1
...
numpy==1.17.4
The former depends on the latter.
In an attempt to get fastparquet to use the version of numpy we want, I thought that pip install --no-deps --no-build-isolation -r requirements.txt would work. --no-deps would ensure that dependencies of the packages listed won't be pulled down by pip, and --no-build-isolation would ensure we don't build fastparquet with a newer version of numpy as a result of pip's build isolation behavior.
Running pip install ... works without error. However, when running my code, I still get this issue when using fastparquet:
ValueError: numpy.ndarray size changed, may indicate binary incompatibility.
Expected 88 from C header, got 80 from PyObject
This error appears to be a numpy version compatibility issue.
Reinstalling fastparquet==0.4.1 via pip install --upgrade --force-reinstall fixes the issue, which implies to me that, the first time around, pip is still using a newer version of numpy.
Note that we are starting from a clean Python virtual environment with neither numpy nor fastparquet installed.
 
     
    