Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in installation #35

Open
rezanit76 opened this issue May 23, 2022 · 7 comments
Open

Error in installation #35

rezanit76 opened this issue May 23, 2022 · 7 comments

Comments

@rezanit76
Copy link

rezanit76 commented May 23, 2022

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 "", line 1, in
File "C:\Users\ReZaN\AppData\Local\Temp\pip-req-build-9qo96lf9\bindings/torch\setup.py", line 41, in
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.6
----------------------------------------
WARNING: Discarding git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

@jmunkberg
Copy link
Collaborator

jmunkberg commented May 23, 2022

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

@ECE-Engineer
Copy link

ECE-Engineer commented May 24, 2022

@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.

@jpyunda
Copy link

jpyunda commented Jun 6, 2022

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;

@MR-JR-01
Copy link

see this #29 (comment)

worked for me

@Lanson426
Copy link

I re-downloaded vs2022 and installed it in the default location (drive C), which has been solved

@Lanson426
Copy link

@rezanit76您需要安装 vs_build_tools 下载,它将设置受支持的 Microsoft Visual C++ 安装。 这应该足以修复该错误。我就是这样修好的。

it worked for me

@superMYJZ
Copy link

superMYJZ commented Apr 19, 2023

这是在寻找cl.exe文件,假如你的VS安装在D盘你需要需修改setup文件
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants