赞
踩
按照官方教程安装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
Visual Studio2019下载链接:https://visualstudio.microsoft.com/zh-hans/vs/older-downloads/
本人选择的是免费的Community版本:
勾选使用C++的桌面开发:
注意:如果安装的VS不是2017-2019版本,会出现以下报错:
右键此电脑->属性->高级系统设置->高级->环境变量
在系统变量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)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。