The NVIDIA driver on your system is too old

The NVIDIA driver on your system is too old

报错代码:

import torch


def _check_driver():
    if not hasattr(torch._C, '_cuda_isDriverSufficient'):
        raise AssertionError("Torch not compiled with CUDA enabled")
    if not torch._C._cuda_isDriverSufficient():
        if torch._C._cuda_getDriverVersion() == 0:
            # found no NVIDIA driver on the system
            raise AssertionError("""
Found no NVIDIA driver on your system. Please check that you
have an NVIDIA GPU and installed a driver from
http://www.nvidia.com/Download/index.aspx""")
        else:
            # TODO: directly link to the alternative bin that needs install
            raise AssertionError("""
The NVIDIA driver on your system is too old (found version {}).
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.""".format(str(torch._C._cuda_getDriverVersion())))


if __name__ == '__main__':

    _check_driver()

我的解决方法:

P100的驱动不好找,我下了一个新的cuda,只装驱动,解决了。

https://www.zhihu.com/question/309583980

原因是我安装的pytorch版本是需要cudav9.2版的,而我电脑上安装的是v9.0版的,不兼容

因此,解决方案是安装cudav9.2版,问题就解决了

原因分析:刚刚重装的系统,其显卡驱动是由Windows 10自身提供的,可能版本比较旧,需要安装最新的驱动。

解决:在NVIDIA官网上重新下载对应的显卡驱动并安装即可(注意:是驱动,并非CUDA)

解决方法

第一种方法是把显卡驱动更新一下。
(1)nvidia-smi -L查看自己的显卡型号。
(2)然后在https://www.nvidia.cn/Download/index.aspx?lang=cn中下载相应驱动。
(3)安装驱动。

第二种方法是安装cuda 7.5。
(1)首先在https://developer.nvidia.com/cuda-toolkit-archive中根据机子环境,下载相应的cuda 7.5安装文件,我下的是sh文件。
(2)然后安装cuda 7.5。
(3)最后sudo pip install mxnet-cu75==1.2.1安装cuda 7.5的mxnet版本即可。

发布了2855 篇原创文章 · 获赞 1113 · 访问量 582万+

猜你喜欢

转载自blog.csdn.net/jacke121/article/details/105662340