Note that h5py (the Python HDF5 shell) has the same problem.
My workaround is to split the pip freeze output into two: into a short requirements file containing only the numpy version of ${NUMPY_REQS} , and a long ${REQS} containing all the other packages. Note the -v switch of the second grep , "reverse match."
pip freeze | tee >( grep '^numpy' > ${NUMPY_REQS} ) | grep -v '^numpy' > ${REQS}
And then call pip install twice (for example, when installing virtual env):
# this installs numpy pip install -r ${NUMPY_REQS}
Please note that this magic tee / grep combination only works on Unix-like systems. I do not know how to achieve the same in Windows.
source share