Pytorch 安装 apex 疑难杂症解决方案

在尝试安装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。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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/
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值