我发现在不同的文件夹中,有时候运行pip install
会构建wheel,这需要很长时间,有时则不会。我不确定为什么以及如何控制这个过程。
我的命令:bin/python -m pip install -r ../requirements.txt
(由于!#
的限制导致行长过长,所以我没有直接使用pip)
输出结果没有构建wheel(只需要几秒钟):
Collecting numpy==1.10.4 (from -r ../requirements.txt (line 1))
Installing collected packages: numpy
Successfully installed numpy-1.10.4
构建轮时的输出(至少需要2分钟)
Collecting numpy==1.10.4 (from -r ../requirements.txt (line 1))
Downloading numpy-1.10.4.tar.gz (4.1MB)
100% |████████████████████████████████| 4.1MB 92kB/s
Building wheels for collected packages: numpy
Running setup.py bdist_wheel for numpy ... done
Stored in directory: /root/.cache/pip/wheels/66/f5/d7/f6ddd78b61037fcb51a3e32c9cd276e292343cdd62d5384efd
Successfully built numpy
Installing collected packages: numpy
Successfully installed numpy-1.10.4
requirements.txt
的内容:
numpy==1.10.4
--only-binary
和--prefer-binary
参数。 - cowlinator