安装tiny-cuda-nn时报错RuntimeError: Could not locate a supported Microsoft Visual C++ installation

这篇具有很好参考价值的文章主要介绍了安装tiny-cuda-nn时报错RuntimeError: Could not locate a supported Microsoft Visual C++ installation。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

问题描述

按照官方教程安装nerf studio,运行命令pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch安装tiny-cuda-nn时,出现以下报错:

× python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\Lenovo\AppData\Local\Temp\pip-req-build-lz_n7l05\bindings/torch\setup.py", line 53, in <module>
          raise RuntimeError("Could not locate a supported Microsoft Visual C++ installation")
      RuntimeError: Could not locate a supported Microsoft Visual C++ installation
      Building PyTorch extension for tiny-cuda-nn version 1.7
      Obtained compute capability 86 from PyTorch
      [end of output]

根据报错,出现问题的原因是找不到Visual C++编译器的位置。

解决方法

参考链接:https://github.com/NVlabs/nvdiffrec/issues/35

Step1: 安装VS2019(已安装可跳过)

下载Visual Studio Installer

Visual Studio2019下载链接:https://visualstudio.microsoft.com/zh-hans/vs/older-downloads/
安装tiny-cuda-nn时报错RuntimeError: Could not locate a supported Microsoft Visual C++ installation
本人选择的是免费的Community版本:
安装tiny-cuda-nn时报错RuntimeError: Could not locate a supported Microsoft Visual C++ installation
勾选使用C++的桌面开发:
安装tiny-cuda-nn时报错RuntimeError: Could not locate a supported Microsoft Visual C++ installation

注意:如果安装的VS不是2017-2019版本,会出现以下报错:
安装tiny-cuda-nn时报错RuntimeError: Could not locate a supported Microsoft Visual C++ installation

Step2: 添加环境变量

右键此电脑->属性->高级系统设置->高级->环境变量
安装tiny-cuda-nn时报错RuntimeError: Could not locate a supported Microsoft Visual C++ installation
在系统变量Path中添加:G:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64 (按照自己的VS安装路径,我的安装路径是G:\Program Files (x86)\Microsoft Visual Studio)
安装tiny-cuda-nn时报错RuntimeError: Could not locate a supported Microsoft Visual C++ installation
安装tiny-cuda-nn时报错RuntimeError: Could not locate a supported Microsoft Visual C++ installation文章来源地址https://www.toymoban.com/news/detail-424588.html

到了这里,关于安装tiny-cuda-nn时报错RuntimeError: Could not locate a supported Microsoft Visual C++ installation的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • RuntimeError: CUDA error: CUBLAS_STATUS_NOT_INITIALIZED when calling `cublas‘

    调用nn.linear时出现RuntimeError: CUDA error: CUBLAS_STATUS_NOT_INITIALIZED when calling `cublas’错误 ,搜索网上资料,主要指出以下原因: batch size太大(本人将batchsize设置成4,够小吧!还是不行。。。) CUDA版本和torch不匹配(本人cuda版本是10.1,pytorch版本安装的是cuda10.1+python3.8的pytorch1.

    2023年04月08日
    浏览(31)
  • RuntimeError: CUDA error: CUBLAS_STATUS_NOT_INITIALIZED when calling `cublasCreate(handle)`

    DialoGPT/data_loader.py at 457835e7d8acd08acf7f6f0e980f36fd327ea37c · microsoft/DialoGPT · GitHub 报错:RuntimeError: CUDA error: CUBLAS_STATUS_NOT_INITIALIZED when calling `cublasCreate(handle)` 我把输入用同样形状的随机张量进行了测试,发现用随机的整数张量可以,但是用我的输入就不行,于是想看看两者的区别

    2024年02月11日
    浏览(107)
  • 解决npm install时报错Could not resolve dependency

    最近在新的项目使用npm install时发现报错: npm WARN cli npm v9.6.4 does not support Node.js v15.14.0. This version of npm supports the following node versions: `^14.17.0 || ^16.13.0 || =18.0.0`. You can find the latest version at https://nodejs.org/. npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR!  npm ERR! While resolving:

    2024年02月08日
    浏览(40)
  • Docker【部署 07】镜像内安装tensorflow-gpu及调用GPU多个问题处理Could not find cuda drivers+unable to find libcuda.so...

    Other than the name, the two packages have been identical since TensorFlow 2.1 也就是说安装2.1版本的已经自带GPU支持。 不同型号的GPU及驱动版本有所区别,环境驱动及CUDA版本如下: 在Docker容器中的程序无法识别CUDA环境变量,可以尝试以下步骤来解决这个问题: 检查CUDA版本:首先,需要确认

    2024年02月04日
    浏览(39)
  • idea的maven多模块项目启动时报错:Could not find artifact或者错误找不到符号

    1、问题描述: 多个项目中遇到idea的多模块maven项目,在启动的时候会报错: 【Could not find artifact,找不到包】 或者 【错误:找不到符号(但明明代码不报红)】 但是在别人的idea上却能正常启动。 2、解决方法: (1)原因说明: 后来发现,项目启动时,idea会自动调用mav

    2024年02月17日
    浏览(50)
  • npm 执行命令时报错npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve

    npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: @vue-office/docx@1.3.0 npm ERR! Found: vue-demi@0.14.6 npm ERR! node_modules/vue-demi npm ERR! vue-demi@“^0.14.6” from the root project npm ERR! vue-demi@“*” from @vueuse/core@9.13.0 npm ERR! node_modules/@vueuse/core npm ERR! @vueuse/core@“^9.1.0” from

    2024年02月07日
    浏览(39)
  • NotImplementedError: Could not run ‘torchvision::nms‘ with arguments from the ‘CUDA‘ backend.

    问题描述:在跑YOLOV5S代码时,出现了下面这个错误。 原因分析:网上说的是cuda的版本和torch的版本不对应。但是自己明明是在pytorch的官网上下载的呀,并且自己的电脑上的cuda版本是11.8,但是pytorch官网上的cuda的最高版本是11.7,我复制里面的命令安装的,但是运行还是出现

    2024年02月16日
    浏览(43)
  • 记录一次老服务器启动ActiveMq时报的Could not create the Java Virtual Machine.错误

    服务器系统CentOS7  1、出现ActiveMq服务无法连接 2、查看activemq状态 service activemq status 显示activemq not running 3、找到ActiveMq的bin目录,# 后台启动 ./activemq console 提示Could not create the Java Virtual Machine.错误 可以判断是java运行环境的问题 4、再看看java版本 java -version 5、再看看activemq版

    2024年04月22日
    浏览(51)
  • Opencv cuda版本在ubuntu22.04中安装办法,解决Could NOT find CUDNN的办法

    解决以下安装问题: 连接地址: https://developer.nvidia.com/cuda-downloads?target_os=Linuxtarget_arch=x86_64Distribution=Ubuntutarget_version=22.04target_type=runfile_local 注意,请下载对应驱动的版本。 默认驱动和 cuda toolkit都会安装成功! 官网下载cuda对应版本的cudnn: https://developer.nvidia.com/rdp/cudnn-arch

    2024年02月03日
    浏览(56)
  • 使用npx electron-forge import命令时报错Could not find git in environment的解决方法

    准备使用Electron Forge​打包项目文件时(打包您的应用程序 | Electron)可能会遇到以下错误:  解决方法:在git的官网(Git for Windows)上下载安装git,然后在git bash的窗体中运行命令即可。 (git的官网)  git下载安装完成后会自动启动git bash,在其中输入并执行命令npx electron

    2024年02月06日
    浏览(42)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包