RuntimeError: Cuda extensions are being compiled with a version of Cuda that does not match the version used to compile Pytorch binaries. Pytorch binaries were compiled with Cuda 9.0.176.
从描述可以看出是cudatoolkit与pytorch.cuda的版本不匹配问题,看了一下自己的cudatoolkit==10.0,pytorch.cuda却是9.0.176
所以重新安装了pytorch,发现pytorch.cuda版本没变。
去网上搜方案,一堆都是去官网找10.0的pytorch.cuda版本,但是官网上并没有找到

还发现了conda安装的命令
但是我是pip安装的,很头疼,接着搜也没搜到可行答案,回头接着去官网找,发现了
去cuda10的那个网址
https://download.pytorch.org/whl/

在尝试安装apex时遇到cudatoolkit与pytorch.cuda版本不匹配的问题。原有cudatoolkit为10.0,而pytorch.cuda为9.0.176。通过重新安装pytorch未改变cuda版本。搜索解决方案,尝试从官网寻找10.0版本的pytorch.cuda未果,后发现conda安装命令,但实际使用的是pip。最终在CUDA10的相关网址找到适用于pip安装的torch1.1-cuda100-python3.5版本,安装后成功安装apex。
最低0.47元/天 解锁文章
7602





