(自用)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
相关推荐
南 阳8 分钟前
Python从入门到精通day56
开发语言·python
m0_5698814715 分钟前
C++中的组合模式高级应用
开发语言·c++·算法
m0_7301151119 分钟前
高性能计算负载均衡
开发语言·c++·算法
孞㐑¥27 分钟前
算法—记忆化搜索
开发语言·c++·经验分享·笔记·算法
xushichao198929 分钟前
代码覆盖率工具实战
开发语言·c++·算法
2401_8579182930 分钟前
C++与WebAssembly集成
开发语言·c++·算法
2401_8796938730 分钟前
C++与微服务架构
开发语言·c++·算法
阿kun要赚马内31 分钟前
Python中函数的进阶用法
开发语言·python
Spliceㅤ35 分钟前
项目:基于qwen的点餐系统
开发语言·人工智能·python·机器学习·自然语言处理
ZHOUPUYU1 小时前
PHP与WebSocket实时通信的原理到生产级应用
开发语言·html·php