运行python setup.py build install报错

报错信息
报错如上:
/usr/include/wchar.h(582): error: attribute “malloc” does not take arguments

15 errors detected in the compilation of “/home/pytorch/InImage/ops_dc3/src/cuda/dcnv3_cuda.cu”.
error: command ‘/usr/local/cuda-11.5/bin/nvcc’ failed with exit code 1

还有报错:
RuntimeError:
The detected CUDA version (11.7) mismatches the version that was used to compile
PyTorch (10.2). Please make sure to use the same CUDA versions.

原因:g++是11.3版本,版本不匹配
https://discuss.pytorch.org/t/detected-cuda-version-11-7-mismatches-the-version-that-was-used-to-compile-pytorch-10-2/153348
解决方法:按https://blog.youkuaiyun.com/tangjiahao10/article/details/125501412的方法把g++降到10版本

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值