I am a relative pipenv newbie, and I am trying to install pytorch with cuda 11 for a machine learning project.
I am installing pytorch on linux with python 3.6. I have made a fresh pipenv environment with pipenv install.
To install the latest version of pytorch with cuda 11, the command is:
pip install torch==1.7.0+cu110 torchvision==0.8.1+cu110 torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html
When I run this command, it works fine and installs:
$ pip install torch==1.7.0+cu110 torchvision==0.8.1+cu110 torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html
Looking in links: https://download.pytorch.org/whl/torch_stable.html
Collecting torch==1.7.0+cu110
Using cached https://download.pytorch.org/whl/cu110/torch-1.7.0%2Bcu110-cp36-cp36m-linux_x86_64.whl (1137.1 MB)
Collecting torchvision==0.8.1+cu110
Using cached https://download.pytorch.org/whl/cu110/torchvision-0.8.1%2Bcu110-cp36-cp36m-linux_x86_64.whl (12.9 MB)
Collecting torchaudio===0.7.0
Using cached torchaudio-0.7.0-cp36-cp36m-manylinux1_x86_64.whl (7.6 MB)
Collecting dataclasses
Using cached dataclasses-0.8-py3-none-any.whl (19 kB)
Collecting numpy
Using cached numpy-1.19.4-cp36-cp36m-manylinux2010_x86_64.whl (14.5 MB)
Processing /home/denisonc/.cache/pip/wheels/6e/9c/ed/4499c9865ac1002697793e0ae05ba6be33553d098f3347fb94/future-0.18.2-py3-none-any.whl
Collecting typing-extensions
Using cached typing_extensions-3.7.4.3-py3-none-any.whl (22 kB)
Collecting pillow>=4.1.1
Using cached Pillow-8.0.1-cp36-cp36m-manylinux1_x86_64.whl (2.2 MB)
Installing collected packages: dataclasses, numpy, future, typing-extensions, torch, pillow, torchvision, torchaudio
Successfully installed dataclasses-0.8 future-0.18.2 numpy-1.19.4 pillow-8.0.1 torch-1.7.0+cu110 torchaudio-0.7.0 torchvision-0.8.1+cu110 typing-extensions-3.7.4.3
(deep-sinter) [denisonc@cvgpu02 deep-sinter]$ pipenv update
Running $ pipenv lock then $ pipenv sync.
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
Updated Pipfile.lock (ca72e7)!
Installing dependencies from Pipfile.lock (ca72e7)...
▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 00:00:00
All dependencies are now up-to-date!
However, changing 'pip' to 'pipenv' causes the following error:
$ pipenv install torch==1.7.0+cu110 torchvision==0.8.1+cu110 torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html
Installing torch==1.7.0+cu110...
Error: An error occurred while installing torch==1.7.0+cu110!
Error text:
ERROR: Could not find a version that satisfies the requirement torch==1.7.0+cu110 (from -r /tmp/pipenv-tvts06b7-requirements/pipenv-0wd75ill-requirement.txt (line 1)) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2, 0.3.1, 0.4.0, 0.4.1, 1.0.0, 1.0.1, 1.0.1.post2, 1.1.0, 1.2.0, 1.3.0, 1.3.1, 1.4.0, 1.5.0, 1.5.1, 1.6.0, 1.7.0)
ERROR: No matching distribution found for torch==1.7.0+cu110 (from -r /tmp/pipenv-tvts06b7-requirements/pipenv-0wd75ill-requirement.txt (line 1))
✘ Installation Failed
Last week I was able to complete this installation on the same system in a different pipenv. In the mean time I upgraded pipenv to the latest version. This error occurred after the upgade.
This is very confusing to me because my understanding was that pipenv uses pip under the hood. I can't understand why the behavior would be different. I would like to install pytorch within my pip environment so that I can keep libraries isolated from other projects.