Skip to content

Cannot pip install torchvision==0.8.0+cu110 #2912

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rsdmse opened this issue Oct 27, 2020 · 13 comments · Fixed by #2913
Closed

Cannot pip install torchvision==0.8.0+cu110 #2912

rsdmse opened this issue Oct 27, 2020 · 13 comments · Fixed by #2913
Assignees

Comments

@rsdmse
Copy link

rsdmse commented Oct 27, 2020

🐛 Bug

Cannot pip install torchvision==0.8.0+cu110

To Reproduce

Steps to reproduce the behavior:

  1. Copy command from pytorch website.
  2. pip install torch==1.7.0+cu110 torchvision==0.8.0+cu110 torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html
  3. Error message as follows
ERROR: Could not find a version that satisfies the requirement torchvision==0.8.0+cu110 (from versions: 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.2.0, 0.2.1, 0.2.2, 0.2.2.post2, 0.2.2.post3, 0.3.0, 0.4.0, 0.4.0+cpu, 0.4.0+cu92, 0.4.1, 0.4.1+cpu, 0.4.1+cu100, 0.4.1+cu92, 0.4.2, 0.4.2+cpu, 0.4.2+cu100, 0.4.2+cu92, 0.5.0, 0.5.0+cpu, 0.5.0+cu100, 0.5.0+cu92, 0.6.0, 0.6.0+cpu, 0.6.0+cu101, 0.6.0+cu92, 0.6.1, 0.6.1+cpu, 0.6.1+cu101, 0.6.1+cu92, 0.7.0, 0.7.0+cpu, 0.7.0+cu101, 0.7.0+cu92, 0.8.0)
ERROR: No matching distribution found for torchvision==0.8.0+cu110

Expected behavior

0.8.0+cu110 should be listed in https://download.pytorch.org/whl/torch_stable.html but it's not.

@seemethere seemethere self-assigned this Oct 27, 2020
@seemethere seemethere transferred this issue from pytorch/pytorch Oct 27, 2020
@seemethere
Copy link
Member

Transferred this issue to pytorch/vision since it has to do with pytorch/vision

@seemethere
Copy link
Member

Currently working on this, will have to issue a v0.8.1 to resolve this though.

@rsdmse
Copy link
Author

rsdmse commented Oct 27, 2020

Thanks for your help. Just wanted to check - would it be ok to install the default torchvision 0.8.0 with torch 1.7.0+cu110?
And is there a way to install http://download.pytorch.org/whl/cu110/torchvision-0.8.0-cp37-cp37m-linux_x86_64.whl which seems to be 0.8.0 with CUDA 11?

@seemethere
Copy link
Member

Yes you can install with pip install -f https://download.pytorch.org/whl/cu110/torch_stable.html torch==1.7.0+cu110 torchvision==0.8.0

@seemethere
Copy link
Member

This should be resolved now, you can use:

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

@pkuppens
Copy link

pkuppens commented Nov 25, 2020

@seemethere , has this problem reappeared??

It worked for me in the past, but today, no luck.

(I do get a permission denied when I try to go to the download link https://download.pytorch.org/ directly:)

Context:
Working on Windows with Visual Studio Code, Jupyter Notebook, on a Python 3.9.0 based virtualenv.
I import numpy 1.19.3 first (because of fmod bug in Windows), and then try both versions you mention:

!pip install numpy==1.19.3
!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
!pip install -f https://download.pytorch.org/whl/cu110/torch_stable.html torch==1.7.0+cu110 torchvision==0.8.0

Results in:

Requirement already satisfied: numpy==1.19.3 in e:\cart-tech\unetcart\.venv\lib\site-packages (1.19.3)
Looking in links: https://download.pytorch.org/whl/torch_stable.html
ERROR: Could not find a version that satisfies the requirement torch===1.7.0+cu110 (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch===1.7.0+cu110
Looking in links: https://download.pytorch.org/whl/cu110/torch_stable.html
ERROR: Could not find a version that satisfies the requirement torch==1.7.0+cu110 (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch==1.7.0+cu110

I also tried from a terminal inside the virtualenv.

(Related question, I'm on CUDA 11.1, is that OK/backward compatible?)

@fmassa fmassa reopened this Nov 27, 2020
@fmassa
Copy link
Member

fmassa commented Nov 27, 2020

Actually, @pkuppens this is a duplicate of #3046

From @vfdev-5 comment there:

yes, it is related to Python 3.9. The binaries for Pytorch, Torchvision and others are only available for Python 3.6, 3.7 and 3.8.

As such, I'm closing as a duplicate. We will be adding Python 3.9 binaries for PyTorch / torchvision soon, and #3041 is a step towards this direction.

@fmassa fmassa closed this as completed Nov 27, 2020
@HGamalElDin
Copy link

Yes you can install with pip install -f https://download.pytorch.org/whl/cu110/torch_stable.html torch==1.7.0+cu110 torchvision==0.8.0

please how to append this to the requirments.txt file? as it always raises (ERROR: Invalid requirement: 'torch==1.7.1+cu101 torchvision==0.8.2+cu101 torchaudio===0.7.2' (from line 12 of E:\requirements.txt)

@vfdev-5
Copy link
Collaborator

vfdev-5 commented Jan 20, 2021

@HGamalElDin try something like

pip install -r requirements.txt -f https://download.pytorch.org/whl/cu110/torch_stable.html 

@HGamalElDin
Copy link

@HGamalElDin try something like

pip install -r requirements.txt -f https://download.pytorch.org/whl/cu110/torch_stable.html 

thank you, this works for me:
Adding in the file,
--find-links https://download.pytorch.org/whl/torch_stable.html
torch==1.7.1+cu101
torchvision==0.8.2+cu101
torchaudio===0.7.2

@kumar-akshay324
Copy link

If the torchvision version has been updated, can the website be updated to reflect these changes please - https://pytorch.org/get-started/previous-versions/#linux-and-windows-9

@Ynjxsjmh
Copy link

I use nvcc to check my CUDA compiler version

$ /usr/local/cuda/bin/nvcc --version

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Wed_Jul_22_19:09:09_PDT_2020
Cuda compilation tools, release 11.0, V11.0.221
Build cuda_11.0_bu.TC445_37.28845127_0

Since it's 11.0 so I just search CUDA 11.0 in https://pytorch.org/get-started/previous-versions/ page, it gives 4 results, for v1.7.0, there are conda and pip installation commands which give the torchvision not found error, hope this can be fixed

$ conda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 cudatoolkit=11.0 -c pytorch
$ pip install torch==1.7.0+cu110 torchvision==0.8.0+cu110 torchaudio==0.7.0 -f https://download.pytorch.org/whl/torch_stable.html

@hiepbk
Copy link

hiepbk commented Apr 18, 2024

Yes you can install with pip install -f https://download.pytorch.org/whl/cu110/torch_stable.html torch==1.7.0+cu110 torchvision==0.8.0

please how to append this to the requirments.txt file? as it always raises (ERROR: Invalid requirement: 'torch==1.7.1+cu101 torchvision==0.8.2+cu101 torchaudio===0.7.2' (from line 12 of E:\requirements.txt)

You can add --find-links https://download.pytorch.org/whl/torch_stable.html in your requirement.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants