Skip to content
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

can't install latest version of torchvision using pip, even though I have the latest dependencies #5313

Closed
trevoravant opened this issue Jan 29, 2022 · 7 comments

Comments

@trevoravant
Copy link

trevoravant commented Jan 29, 2022

🐛 Describe the bug

First of all, the issue I'm about to describe is similar to #4076, but I don't have opencv installed and I'm using pip. Also, I'm not sure if I should create this issue on torchvision or pip's Github page.

I'm trying to install torchvision with pip. I use Arch Linux, and I have a recent version of torch (1.10.2) installed through Arch's python-pytorch-cuda package. I also have python 3.10.2 installed. When I try to install torchvision using pip, I expect it to install the latest version: 0.11.1. However, it will only install version 0.2.2.post3.

$ pip install --user torchvision
Requirement already satisfied: torchvision in /home/trevor/.local/lib/python3.10/site-packages (0.2.2.post3)
Requirement already satisfied: torch in /usr/lib/python3.10/site-packages (from torchvision) (1.10.2)
Requirement already satisfied: six in /usr/lib/python3.10/site-packages (from torchvision) (1.16.0)
Requirement already satisfied: numpy in /home/trevor/.local/lib/python3.10/site-packages (from torchvision) (1.22.1)
Requirement already satisfied: pillow>=4.1.1 in /home/trevor/.local/lib/python3.10/site-packages (from torchvision) (9.0.0)
Requirement already satisfied: typing_extensions in /usr/lib/python3.10/site-packages (from torch->torchvision) (4.0.1)

I have also tested this on another machine without CUDA support (I installed torch through Arch's python-pytorch package) and I get the same result.

Versions

Collecting environment information...
PyTorch version: 1.10.2
Is debug build: False
CUDA used to build PyTorch: 11.5
ROCM used to build PyTorch: N/A

OS: Arch Linux (x86_64)
GCC version: (GCC) 11.1.0
Clang version: 13.0.0
CMake version: version 3.22.2
Libc version: glibc-2.33

Python version: 3.10.2 (main, Jan 15 2022, 19:56:27) [GCC 11.1.0] (64-bit runtime)
Python platform: Linux-5.16.3-arch1-1-x86_64-with-glibc2.33
Is CUDA available: True
CUDA runtime version: 11.5.119
GPU models and configuration: GPU 0: NVIDIA GeForce GTX 1080 Ti
Nvidia driver version: 495.46
cuDNN version: Probably one of the following:
/usr/lib/libcudnn.so.8.3.0
/usr/lib/libcudnn_adv_infer.so.8.3.0
/usr/lib/libcudnn_adv_train.so.8.3.0
/usr/lib/libcudnn_cnn_infer.so.8.3.0
/usr/lib/libcudnn_cnn_train.so.8.3.0
/usr/lib/libcudnn_ops_infer.so.8.3.0
/usr/lib/libcudnn_ops_train.so.8.3.0
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.22.1
[pip3] torch==1.10.2
[pip3] torchvision==0.2.2.post3
[conda] Could not collect

@aryanraj2713
Copy link

add a requirement.txt file for to install libs.

@oke-aditya
Copy link
Contributor

oke-aditya commented Jan 29, 2022

Aah this issue of torchvision 0.2.2 is very redundant. See #4273 #4665 #4648

Also CUDA 11.5 is not supported currently.

You can try with CUDA 11.3 as per instructions from docs https://pytorch.org/

pip3 install torch==1.10.2+cu113 torchvision==0.11.3+cu113 torchaudio==0.10.2+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html

@trevoravant
Copy link
Author

@oke-aditya Thanks but I don't think CUDA is the culprit because (as I mentioned in the original post) I get the same problem without CUDA. I've looked at the issues you linked to, but still can't make sense of this.

@NicolasHug
Copy link
Member

@trevoravant could you please try using the official instructions at https://pytorch.org/get-started/locally/ ?

@pmeier
Copy link
Contributor

pmeier commented Jan 31, 2022

I also have python 3.10.2 installed.

There are no stable binaries for Python 3.10 yet. However, there are nightlies available.

@trevoravant
Copy link
Author

@NicolasHug @pmeier Thank you for the suggestions. I uninstalled the Arch Linux package that I used to install torch. I also uninstalled CUDA just to eliminate another variable. I tried to install both the stable and nightly CPU-only versions of torch and torchvision from pytorch.org. The stable version produces the error:

ERROR: Could not find a version that satisfies the requirement torch==1.10.2+cpu
ERROR: No matching distribution found for torch==1.10.2+cpu

the nightly version doesn't produce an error, but still only installs torchvision 0.2.2.post3.

So is this because I'm using Python 3.10.2?

@pmeier
Copy link
Contributor

pmeier commented Feb 1, 2022

So is this because I'm using Python 3.10.2?

Yes. There is currently no version of PyTorch that supports Python 3.10. The next release in late February / early March will. I suggest you use something like pyenv or conda to create a virtual environment with Python < 3.10 and go from there.

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

No branches or pull requests

5 participants