Skip to content Skip to sidebar Skip to footer

Install Pytorch From Requirements.txt

Torch documentation says use pip install torch==1.4.0+cpu torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html to install the latest version of PyTorch. Th

Solution 1:

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

Solution 2:

-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 :)

Solution 3:

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

Post a Comment for "Install Pytorch From Requirements.txt"