nvdiffrec
nvdiffrec copied to clipboard
Error in installation
run this line: pip install --global-option="--no-networks" git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch
then get this error :
ERROR: Command errored out with exit status 1:
command: 'C:\Users\ReZaN.conda\envs\dmodel\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] ="'"'C:\Users\ReZaN\AppData\Local\Temp\pip-req-build-9qo96lf9\bindings/torch\setup.py'"'"'; file='"'"'C:\Users\ReZaN\AppData\Local\Temp\pip-req-build-9qo96lf9\bindings/torch\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\ReZaN\AppData\Local\Temp\pip-pip-egg-info-gryf3c1b'
cwd: C:\Users\ReZaN\AppData\Local\Temp\pip-req-build-9qo96lf9\bindings/torch
Complete output (6 lines):
Traceback (most recent call last):
File "
As noted in our installation instructions, we require Visual Studio to build tiny-cuda-nn. From the log above, it seems VS is not found in your env.
raise RuntimeError("Could not locate a supported Microsoft Visual C++ installation")
RuntimeError: Could not locate a supported Microsoft Visual C++ installation
If the error persists, I would suggest reporting that issue there https://github.com/NVlabs/tiny-cuda-nn, or testing their bindings in isolation to track down the issue: https://github.com/NVlabs/tiny-cuda-nn#pytorch-extension
@rezanit76 you need to install the vs_build_tools download, which will setup a supported Microsoft Visual C++ installation. That should be enough to fix that error. That's how I fixed it.
I´ve got the same error. In the TinyCuda documentations they suggest to install Visual Studio Code, C++ complements, and at least run "helloWorld". However, I kept getting the error: "Could not locate a supported Microsoft Visual C++ installation".
What worked for me instantly was to add in PATH the location of "cl.exe". It is embedded in the installation of Microsoft Visual Studio (probably Visual Studio Code is not a must, but I'm not sure). In Windows, go to System Properties >> Advanced system settings >> Advanced (tab) >> Environment variables >> PATH (edit) >> here I've added a new line with: C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\bin\Hostx64\x64 This is the location of "cl.exe" which is the C++ compiler.
I've had to add several variables in PATH. Just for the record this is my entire PATH: C:\Program Files\Git\bin;C:\Program Files\Git\cmd;C:\Users\jpyunda\Documents\Nvidia CUDA docs\zlib123dllx64;C:\Program Files\NVIDIA\CUDNN\v 8.4.1.50;C:\Program Files\CMake\bin;C:\Users\jpyunda\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.32.31326\bin\Hostx64\x64;
see this https://github.com/NVlabs/nvdiffrec/issues/29#issuecomment-1262260239
worked for me
I re-downloaded vs2022 and installed it in the default location (drive C), which has been solved
@rezanit76您需要安装 vs_build_tools 下载,它将设置受支持的 Microsoft Visual C++ 安装。 这应该足以修复该错误。我就是这样修好的。
it worked for me
这是在寻找cl.exe文件,假如你的VS安装在D盘你需要需修改setup文件