Open SubhamBurnwal-BiswaGames opened 2 months ago
In setup.py there are two places it has c++14. change these to c++17
This lets me compile it with python setup.py build_ext --inplace
, but attempting to install the build with pip install .
fails during wheel building with ModuleNotFoundError: No module named 'torch'
so your mileage may vary with this advice
Description
Tried setting up this project on local machine but cannot install Raymarching, and other extensions due to various errors. I have solved some step by step but stuck right now.
Steps to Reproduce
I am following the Instant-NGP backbone collab notebook provided in README.md, locally on my machine: https://colab.research.google.com/drive/1MXT3yfOFvO0ooKEfiUUvTKwUkrrlCHpF?usp=sharing
! conda install ipykernel
! conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
git-cloned the repository as given in the notebook.
once inside the repo, I commented out "torch" since we already installed above (this was suggested in another issue solution here)
I install remaining dependencies:
! pip install -r requirements.txt
Everything installed except PyMCubes. The error was it could not find VS C++17 to build. It was suggested online that I dont need to build it just install using this, so I did:
! pip install PyMCubes --no-cache-dir
Now I reached this portion of building/installing extensions: The first extension was raymarching
! pip install ./raymarching
I got this error: "Could not locate a supported Microsoft Visual C++ installation"I tracked this error to the file: stable-dreamfusion/raymarching/setup.py
_src_path = os.path.dirname(os.path.abspath(file))
nvcc_flags = [ '-O3', '-std=c++14', '-UCUDA_NO_HALF_OPERATORS', '-UCUDA_NO_HALF_CONVERSIONS', '-U__CUDA_NO_HALF2_OPERATORS__', ]
if os.name == "posix": c_flags = ['-O3', '-std=c++14'] elif os.name == "nt": c_flags = ['/O2', '/std:c++17']
Processing d:\python\stable-dreamfusion\raymarching Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Building wheels for collected packages: raymarching Building wheel for raymarching (setup.py): started Building wheel for raymarching (setup.py): still running... Building wheel for raymarching (setup.py): finished with status 'error' Running setup.py clean for raymarching Failed to build raymarching error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [100 lines of output] running bdist_wheel running build running build_ext building '_raymarching' extension creating D:\Python\stable-dreamfusion\raymarching\build creating D:\Python\stable-dreamfusion\raymarching\build\temp.win-amd64-cpython-312 creating D:\Python\stable-dreamfusion\raymarching\build\temp.win-amd64-cpython-312\Release creating D:\Python\stable-dreamfusion\raymarching\build\temp.win-amd64-cpython-312\Release\Python creating D:\Python\stable-dreamfusion\raymarching\build\temp.win-amd64-cpython-312\Release\Python\stable-dreamfusion creating D:\Python\stable-dreamfusion\raymarching\build\temp.win-amd64-cpython-312\Release\Python\stable-dreamfusion\raymarching creating D:\Python\stable-dreamfusion\raymarching\build\temp.win-amd64-cpython-312\Release\Python\stable-dreamfusion\raymarching\src C:\Users\BG.conda\envs\sdf1\Lib\site-packages\torch\utils\cpp_extension.py:1967: UserWarning: TORCH_CUDA_ARCH_LIST is not set, all archs for visible cards are included for compilation. If this is not desired, please set os.environ['TORCH_CUDA_ARCH_LIST']. warnings.warn( Emitting ninja build file D:\Python\stable-dreamfusion\raymarching\build\temp.win-amd64-cpython-312\Release\build.ninja... Compiling objects... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) [1/2] C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin\nvcc --generate-dependencies-with-compile --dependency-output D:\Python\stable-dreamfusion\raymarching\build\temp.win-amd64-cpython-312\Release\Python\stable-dreamfusion\raymarching\src\raymarching.obj.d -std=c++17 --use-local-env -Xcompiler /MD -Xcompiler /wd4819 -Xcompiler /wd4251 -Xcompiler /wd4244 -Xcompiler /wd4267 -Xcompiler /wd4275 -Xcompiler /wd4018 -Xcompiler /wd4190 -Xcompiler /wd4624 -Xcompiler /wd4067 -Xcompiler /wd4068 -Xcompiler /EHsc -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -IC:\Users\BG.conda\envs\sdf1\Lib\site-packages\torch\include -IC:\Users\BG.conda\envs\sdf1\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\BG.conda\envs\sdf1\Lib\site-packages\torch\include\TH -IC:\Users\BG.conda\envs\sdf1\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\include" -IC:\Users\BG.conda\envs\sdf1\include -IC:\Users\BG.conda\envs\sdf1\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" -c D:\Python\stable-dreamfusion\raymarching\src\raymarching.cu -o D:\Python\stable-dreamfusion\raymarching\build\temp.win-amd64-cpython-312\Release\Python\stable-dreamfusion\raymarching\src\raymarching.obj -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr -O3 -std=c++14 -UCUDA_NO_HALF_OPERATORS -UCUDA_NO_HALF_CONVERSIONS -UCUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_raymarching -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 FAILED: D:/Python/stable-dreamfusion/raymarching/build/temp.win-amd64-cpython-312/Release/Python/stable-dreamfusion/raymarching/src/raymarching.obj C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin\nvcc --generate-dependencies-with-compile --dependency-output D:\Python\stable-dreamfusion\raymarching\build\temp.win-amd64-cpython-312\Release\Python\stable-dreamfusion\raymarching\src\raymarching.obj.d -std=c++17 --use-local-env -Xcompiler /MD -Xcompiler /wd4819 -Xcompiler /wd4251 -Xcompiler /wd4244 -Xcompiler /wd4267 -Xcompiler /wd4275 -Xcompiler /wd4018 -Xcompiler /wd4190 -Xcompiler /wd4624 -Xcompiler /wd4067 -Xcompiler /wd4068 -Xcompiler /EHsc -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -IC:\Users\BG.conda\envs\sdf1\Lib\site-packages\torch\include -IC:\Users\BG.conda\envs\sdf1\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\BG.conda\envs\sdf1\Lib\site-packages\torch\include\TH -IC:\Users\BG.conda\envs\sdf1\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\include" -IC:\Users\BG.conda\envs\sdf1\include -IC:\Users\BG.conda\envs\sdf1\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" -c D:\Python\stable-dreamfusion\raymarching\src\raymarching.cu -o D:\Python\stable-dreamfusion\raymarching\build\temp.win-amd64-cpython-312\Release\Python\stable-dreamfusion\raymarching\src\raymarching.obj -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr -O3 -std=c++14 -UCUDA_NO_HALF_OPERATORS -UCUDA_NO_HALF_CONVERSIONS -UCUDA_NO_HALF2_OPERATORS -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_raymarching -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 cl : Command line warning D9025 : overriding '/D__CUDA_NO_HALF_OPERATORS' with '/UCUDA_NO_HALF_OPERATORS' cl : Command line warning D9025 : overriding '/DCUDA_NO_HALF_CONVERSIONS' with '/UCUDA_NO_HALF_CONVERSIONS' cl : Command line warning D9025 : overriding '/DCUDA_NO_HALF2_OPERATORS' with '/U__CUDA_NO_HALF2_OPERATORS__'
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for raymarching ERROR: Could not build wheels for raymarching, which is required to install pyproject.toml-based projects