windows下mmcv-full安装

在Windows上安装mmcv-full时遇到'No module named 'mmcv._ext''错误,需要特定版本的pytorch(1.8.0)和CUDA(11.1)。解决步骤包括设置MSVC编译器、更改系统语言为英文、在PowerShell(管理员模式)中操作,并针对特定错误修改torch的源文件。
摘要由CSDN通过智能技术生成

主要是遇到这个问题:

ModuleNotFoundError: No module named ‘mmcv._ext‘

error: a member with an in-class initializer must be const

请使用:pytorch1.8.0   cuda11.1

安装步骤:

设置 MSVC 编译器:下载Visual Studio2017和2019

    设置环境变量。添加 `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\Hostx86\x64` 到 `PATH`。

    为了兼容性,我们使用 x86-hosted 以及 x64-targeted 版本,即路径中的 `Hostx86\x64` 。

    在cmd中运行cl

(base) PS C:\Users> cl
Microsoft (R) C/C++ Optimizing Compiler Version 19.27.29111 for x64
Copyright (C) Microsoft Corporation. All rights reserved.

usage: cl [ option... ] filename... [ /link linkoption... ]

②将系统语言更改为英语。控制面板 -> 地区-> 管理-> 非 Unicode 来进行语言转换.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值