Install PyTorch from requirements.txt
Add --find-links
in requirements.txt
before torch
--find-links https://download.pytorch.org/whl/torch_stable.html
torch==1.2.0+cpu
Source: https://github.com/pytorch/pytorch/issues/29745#issuecomment-553588171
You can do something like that:
$ pip install -r req.txt --find-links https://download.pytorch.org/whl/torch_stable.html
Just put your PyTorch requirements in req.txt
like this:
torch==1.4.0+cpu
torchvision==0.5.0+cpu
-f https://download.pytorch.org/whl/torch_stable.html
torch==1.4.0+cpu
-f https://download.pytorch.org/whl/torch_stable.html
torchvision==0.5.0+cpu
worked fine for me :)