You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

安装tiny-cuda-nn的Torch绑定报错:subprocess-exited-with-error

tiny-cuda-nn Torch绑定安装失败解决办法

问题背景

安装NeRFstudio过程中,执行以下命令安装tiny-cuda-nn的Torch绑定:

pip install ninja git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch

出现报错,核心错误为:

RuntimeError: Could not locate a supported Microsoft Visual C++ installation

已尝试执行python -m pip install --upgrade pip升级pip,提示依赖已满足,但问题未解决。

解决步骤

  • 安装Visual C++ Build Tools
    tiny-cuda-nn编译需要C++编译环境,直接安装微软的Visual Studio Build Tools:

    1. 前往微软官网搜索并下载「Visual Studio Build Tools」安装包
    2. 运行安装程序,勾选「桌面开发使用C++」组件(默认包含MSVC编译器、Windows SDK等必需组件)
    3. 完成安装后重启电脑,重新执行tiny-cuda-nn的安装命令
  • 验证编译环境
    打开命令提示符,输入cl,若输出MSVC编译器版本信息,说明环境配置成功

  • 版本匹配检查
    确保PyTorch与CUDA版本兼容,tiny-cuda-nn推荐搭配PyTorch 2.x + CUDA 11.7/11.8使用

内容的提问来源于stack exchange,提问作者Kirk Ding

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.14 19:10:15