I ned to install a specific version of pytorch cpu mode.
With pip I would do it like this:
pip install torch==1.2.0+cpu torchvision==0.4.0+cpu -f https://download.pytorch.org/whl/torch_stable.html --trusted-host download.pytorch.org
How can I achieve the same using Pipenv?
I tried having the following Pipfile:
[[source]]
name = "pytorch"
url = "https://download.pytorch.org/whl/cpu"
verify_ssl = false
[packages]
torchvision = {index = "pytorch", version = "==0.4.0"}
torch = {index = "pytorch", version = "==1.2.0"}
but didn't work
You can do:
But, you'll have to ensure that you add
PIP_FIND_LINKS
for any consecutivepipenv sync
,pipenv lock
, etc.UPD:
You may also add
PIP_FIND_LINKS="https://download.pytorch.org/whl/torch_stable.html"
to the.env
file, but it's only being loaded onpipenv run
andpipenv shell
.