使用Wheel文件通过pip安装时强制执行软件包顺序

时间:2019-03-13 19:31:18

标签: python pip python-wheel python-packaging

我有一个Python requirements.txt文件,如下所示:

torch==1.0.0
torchvision==0.2.1
opencv_python==3.4.2.17
numpy==1.15.1
gputil==1.3.0
scikit_learn==0.19.2
scikit_image==0.14.0
sk_video==1.1.10
git+https://github.com/facebookresearch/maskrcnn-benchmark.git@5ec0b91cc85163ac3b58265b3f9b39bb327d0ba6

首先,我生成一个wheel文件,如下所示:

pip wheel --wheel-dir=wheels --no-deps .

然后我将其安装为:

pip install --no-cache -r requirements.txt --find-links=./wheels

但是,无论我将git项目放在我的requirements.txt文件中的哪个位置,pip总是要尝试安装的第一件事。这是有问题的,因为首先需要安装其他软件包。如何在软件包安装中指定或强制执行某些命令?

0 个答案:

没有答案
相关问题