RuntimeError: Detected that PyTorch and torchvision were compiled with different CUDA versions

I installed pytorch and torchvision before, but I'm getting this issue, when I want tor run pytorch project.

RuntimeError: Detected that PyTorch and torchvision were compiled with different CUDA versions. PyTorch has CUDA Version=9.0 and torchvision has CUDA Version=10.0. Please reinstall the torchvision that matches your PyTorch install.

I'm using
Python 3.5
Cuda 10.1
Pytorch 1.1.*

It says I need to update my torchvision, but I can't, cause my CUDA version is already 10.1. How to solve this?

cudapytorchcuda10torchvision
3 votesLP185.00
1 Answers
JW229.00
2

I recommend you to install new pytorch and torchvision together from official sources.
If you use anaconda, then run this 

conda install pytorch torchvision cudatoolkit=10.0 -c pytorch

Or use pip / pip3 when you use python package manager

pip3 install https://download.pytorch.org/whl/cu100/torch-1.1.0-cp36-cp36m-linux_x86_64.whl
pip3 install https://download.pytorch.org/whl/cu100/torchvision-0.3.0-cp36-cp36m-linux_x86_64.whl

Take a look at this official link for pytorch installation

Reply
Couldn't find what you were looking for?and we will find an expert to answer.
How helpful was this page?