FCOS出现No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda-10.0'


)

出现下面报错

AssertionError:
The NVIDIA driver on your system is too old (found version 10000).
Please update your GPU driver by downloading and installing a new
version from the URL: http://www.nvidia.com/Download/index.aspx
Alternatively, go to: https://pytorch.org to install
a PyTorch version that has been compiled with your version
of the CUDA driver.
FCOS出现No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda-10.0'

错误原因

cuda版本与torch版本不匹配
我的机器上pytorch版本过新,而cuda版本太老,两者无法匹配
一般是torch版本没装对

查看版本

nvcc -V
FCOS出现No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda-10.0'
pip3 list
#或者
pip list
FCOS出现No CUDA runtime is found, using CUDA_HOME='/usr/local/cuda-10.0'
cuda10.0 与torch 1.3.1不匹配

解决方法(cuda10.0 与torch 1.2.0才匹配)

卸载原torch1.3.1
pip3 uninstall torch
#或者
pip uninstall torch

重装torch1.2.0
pip3 install torch1.2.0 torchvision0.4.0 -f https://download.pytorch.org/whl/torch_stable.html
pip install torch1.2.0 torchvision0.4.0 -f https://download.pytorch.org/whl/torch_stable.html

在查看是否装成功torch1.2.0即可
pip3 list
#或者
pip list

最后版本的cuda与torch版本匹配去官网查一下即可
查看pytorch官网 https://pytorch.org/get-started/previous-versions/ 看到这样一处

相关文章: