pip mmcv记录

 跑姿态估计代码时(cuda版本是11.8),安装mmcv这一步出现了问题:

 pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu118/torch2.3.1/index.html
在pycharm终端执行完这条命令后,开始报错:

error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

解决方式就是安装:Visual Studio

安装了Visual Studio 2022最新的一版(17.10.4)。下载界面勾选了C++桌面开发,再去执行了pip mmcv的命令,报错:

 fatal error C1189: #error:  -- unsupported Microsoft Visual Studio version! Only the versions between 2017 and 2022 (inclusive) are supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
CUDA 不支持 Visual Studio的版本,要求下载2017-2022的Visual Studio,不过在电脑上下载的就是2022的版本,不知道为什么不支持。后面查了许多资料了解到:

“17.10 is not supported.”

cuda不支持Visual Studio 202217.10之后的版本,看到一些网友说下载了17.9.6的旗舰版解决了上述问题,不过找了半天没找到17.9.6的下载版本。后面修改了D:\CUDA\development\include\crt文件夹下的host_config.h,解决了问题。

将#if _MSC_VER < 1910 || _MSC_VER >= 1940

修改为了:

#if _MSC_VER < 1910 || _MSC_VER >= 2030

期间又报错:

UserWarning: Error checking compiler version for cl: [WinError 2] 系统找不到指定的文件。

解决方法就是把D:\360Downloads\VSIDE\VC\Tools\MSVC\14.40.33807\bin\Hostx64\x64添加到了系统变量。

最后所有问题都解决:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值