(自用)mmcv下载失败

conda install -n embodiedocc mmcv 报错如下

python 复制代码
compiler version for cl: [WinError 2] 系统找不到指定的文件。
        warnings.warn(f'Error checking compiler version for {compiler}: {error}')
      error: [WinError 2] 系统找不到指定的文件。
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for mmcv
  Running setup.py clean for mmcv
Failed to build mmcv
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (mmcv)

在之前的尝试中,我遇到了几个挑战:

  1. 系统中没有安装Visual Studio Build Tools,导致无法编译mmcv

  2. 系统中没有安装git,导致无法从GitHub源码安装

  3. CUDA版本不匹配(系统中有CUDA 12.6,但mmcv预编译版本最高支持CUDA 12.1)

为了解决这些问题,我采取了以下步骤:

  1. 下载CUDA 11.8的mmcv

  2. 然后找到了OpenMMLab提供的预编译wheel文件,这些文件是为特定的CUDA和PyTorch版本组合编译的

  3. 最关键的是,使用了正确的安装命令,指定了与环境中CUDA 11.8和PyTorch 2.1.0匹配的预编译版本:

python 复制代码
pip install mmcv==2.1.0 -f https://download.openmmlab.com/mmcv/dist/cu118/torch2.1.0/index.html --trusted-host download.openmmlab.com
相关推荐
郑州光合科技余经理5 天前
代码展示:PHP搭建海外版外卖系统源码解析
java·开发语言·前端·后端·系统架构·uni-app·php
feifeigo1235 天前
matlab画图工具
开发语言·matlab
dustcell.5 天前
haproxy七层代理
java·开发语言·前端
norlan_jame5 天前
C-PHY与D-PHY差异
c语言·开发语言
多恩Stone5 天前
【C++入门扫盲1】C++ 与 Python:类型、编译器/解释器与 CPU 的关系
开发语言·c++·人工智能·python·算法·3d·aigc
QQ4022054965 天前
Python+django+vue3预制菜半成品配菜平台
开发语言·python·django
遥遥江上月5 天前
Node.js + Stagehand + Python 部署
开发语言·python·node.js
m0_531237175 天前
C语言-数组练习进阶
c语言·开发语言·算法
Railshiqian5 天前
给android源码下的模拟器添加两个后排屏的修改
android·开发语言·javascript
雪人不是菜鸡5 天前
简单工厂模式
开发语言·算法·c#