本文介绍了在Requirements.txt中包含.whl安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将其包含在requirements.txt文件中?对于Linux:pip install http://download.pytorch.org/whl/cu75/torch-0.1.12.post2-cp27-none-linux_x86_64.whl
pip install torchvision
对于MacOS:
pip install http://download.pytorch.org/whl/torch-0.1.12.post2-cp27-none-macosx_10_7_x86_64.whl
pip install torchvision
推荐答案
可以使用environment markers:
http://download.pytorch.org/whl/cu75/torch-0.1.12.post2-cp27-none-linux_x86_64.whl ; sys_platform == "linux"
http://download.pytorch.org/whl/cu75/torch-0.1.12.post2-cp27-none-linux_x86_64.whl ; sys_platform == "linux2"
http://download.pytorch.org/whl/torch-0.1.12.post2-cp27-none-macosx_10_7_x86_64.whl ; sys_platform == "darwin"
torchvision
(双Linux条目:linux2
对于Python 2,linux
对于Python 3。)
这篇关于在Requirements.txt中包含.whl安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!