导入torchvision时报错pytorch和torchvision的cuda版本不一样
When I import torchvision, I get an error that the cuda version of pytorch and torchvision are different
导入 torchvision 时出现以下错误。
Detected that PyTorch and torchvision were compiled with different CUDA versions. PyTorch has CUDA Version=11.0 and torchvision has CUDA Version=10.1. Please reinstall the torchvision that matches your PyTorch install.
如何将pytorch的cuda版本改为10.1?
'conda install pytorch torchvision cudatoolkit=10.1-c pytorch' 来自 anaconda 提示符
即使我这样做,我也会得到同样的错误。
我用的是windows10,jupyter notebook虚拟环境下用的是python3.7版本
卸载并重新安装可能有效
!conda uninstall pytorch torchvision
与:
!conda install pytorch torchvision cudatoolkit=10.1 -c pytorch
导入 torchvision 时出现以下错误。
Detected that PyTorch and torchvision were compiled with different CUDA versions. PyTorch has CUDA Version=11.0 and torchvision has CUDA Version=10.1. Please reinstall the torchvision that matches your PyTorch install.
如何将pytorch的cuda版本改为10.1?
'conda install pytorch torchvision cudatoolkit=10.1-c pytorch' 来自 anaconda 提示符 即使我这样做,我也会得到同样的错误。
我用的是windows10,jupyter notebook虚拟环境下用的是python3.7版本
卸载并重新安装可能有效
!conda uninstall pytorch torchvision
与:
!conda install pytorch torchvision cudatoolkit=10.1 -c pytorch