Greetings! I am trying to run this wonderful tool on Windows 11 x64. For the other tools like the viewer, I didnt build them but used the setups you have kindly created for Windows, so thanks for that too! For this repo I ran the commands for creating environment.yml file but in the middle of things it says "crtdefs.h not found", among other errors.
I am trying to use this but I am not an expert in build tools. I have some doubts regarding the following requirements set forth in README.MD:
- C++ Compiler for PyTorch extensions (we used Visual Studio 2019 for Windows)
- CUDA SDK 11 for PyTorch extensions (we used 11.8, known issues with 11.6)
- C++ Compiler and CUDA SDK must be compatible
q1. I have Visual Studio 2022 x64 installed. Is having it installed enough?
q2. I have noticed that creating the environment the first time automatically installs and sets up cuda for py, etc. I still downloaded and setup CUDA Toolkit 11.8 from official developer.nvidia.com. All are x64 bit.
q3. I suppose I could build the submodules by opening them in Visual Studio myself but I would prefer not to.. So I tried to look up for online solutions for where the missing libraries are and adding their folders to path. At first activating the environment said "Cant find ninja, falling back to slow old tools.. Cannot find cl.exe"
I found the file at: %ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\bin\Hostx64\x64
and added it to path, thereafter I believe it has fixed the issue.
Visual Studio proceeded to the next issue: "crtdefs.h". There is one big difference that In my case the Visual Studio directory has a different structure than most solutions given online for missing libraries and utils, probably because MS keeps shifting headers around.
I had crtdefs.h in both these directories, I added the first one to path, but hasnt worked:
%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include\
%ProgramFiles%\Microsoft Visual Studio\2022\Community\SDK\ScopeCppSDK\vc15\VC\include\
Online solutions that are using older versions of VS have this header present at the following path:
%ProgramFiles%\Microsoft Visual Studio\2022\Community\VC\include\
What I also tried was opening the submodules like diff-gaussian-rasterization on Visual Studio and building them from there assuming Visual Studio would know where to get the missing headers, and that building suceeded. but nothing to help with this issue. I therefore cannot proceed with the setup. Kindly help. Heres the full trace:
D:\gaussian-splatting>conda env create --file environment.yml
Retrieving notices: ...working... done
Collecting package metadata (repodata.json): done
Solving environment: done
Downloading and Extracting Packages
Preparing transaction: done
Verifying transaction: done
Executing transaction: | "By downloading and using the CUDA Toolkit conda packages, you accept the terms and conditions of the CUDA End User License Agreement (EULA): https://docs.nvidia.com/cuda/eula/index.html"
done
Installing pip dependencies: / Ran pip subprocess with arguments:
['C:\\Users\\User\\miniconda3\\envs\\gaussian_splatting\\python.exe', '-m', 'pip', 'install', '-U', '-r', 'D:\\gaussian-splatting\\condaenv.wui8rdg4.requirements.txt', '--exists-action=b']
Pip subprocess output:
Processing D:\gaussian-splatting\submodules\diff-gaussian-rasterization
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Processing D:\gaussian-splatting\submodules\simple-knn
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: diff-gaussian-rasterization, simple-knn
Building wheel for diff-gaussian-rasterization (setup.py): started
Building wheel for diff-gaussian-rasterization (setup.py): finished with status 'error'
Running setup.py clean for diff-gaussian-rasterization
Building wheel for simple-knn (setup.py): started
Building wheel for simple-knn (setup.py): finished with status 'error'
Running setup.py clean for simple-knn
Failed to build diff-gaussian-rasterization simple-knn
Installing collected packages: simple-knn, diff-gaussian-rasterization
Running setup.py install for simple-knn: started
Running setup.py install for simple-knn: finished with status 'error'
Pip subprocess error:
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
running bdist_wheel
C:\Users\User\miniconda3\envs\gaussian_splatting\lib\site-packages\torch\utils\cpp_extension.py:411: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
warnings.warn(msg.format('we could not find ninja.'))
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-37
creating build\lib.win-amd64-cpython-37\diff_gaussian_rasterization
copying diff_gaussian_rasterization\__init__.py -> build\lib.win-amd64-cpython-37\diff_gaussian_rasterization
running build_ext
C:\Users\User\miniconda3\envs\gaussian_splatting\lib\site-packages\torch\utils\cpp_extension.py:813: UserWarning: The detected CUDA version (11.8) has a minor version mismatch with the version that was used to compile PyTorch (11.6). Most likely this shouldn't be a problem.
warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
building 'diff_gaussian_rasterization._C' extension
creating build\temp.win-amd64-cpython-37
creating build\temp.win-amd64-cpython-37\Release
creating build\temp.win-amd64-cpython-37\Release\cuda_rasterizer
"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin\nvcc" -c cuda_rasterizer/backward.cu -o build\temp.win-amd64-cpython-37\Release\cuda_rasterizer/backward.obj -IC:\Users\User\miniconda3\envs\gaussian_splatting\lib\site-packages\torch\include -IC:\Users\User\miniconda3\envs\gaussian_splatting\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\User\miniconda3\envs\gaussian_splatting\lib\site-packages\torch\include\TH -IC:\Users\User\miniconda3\envs\gaussian_splatting\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\include" -IC:\Users\User\miniconda3\envs\gaussian_splatting\include -IC:\Users\User\miniconda3\envs\gaussian_splatting\Include -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -ID:\gaussian-splatting\submodules\diff-gaussian-rasterization\third_party/glm/ -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 --use-local-env
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\include\crt/host_config.h(231): fatal error C1083: Cannot open include file: 'crtdefs.h': No such file or directory
backward.cu
error: command 'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.8\\bin\\nvcc.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for diff-gaussian-rasterization
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [12 lines of output]
running bdist_wheel
C:\Users\User\miniconda3\envs\gaussian_splatting\lib\site-packages\torch\utils\cpp_extension.py:411: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
warnings.warn(msg.format('we could not find ninja.'))
running build
running build_ext
C:\Users\User\miniconda3\envs\gaussian_splatting\lib\site-packages\torch\utils\cpp_extension.py:813: UserWarning: The detected CUDA version (11.8) has a minor version mismatch with the version that was used to compile PyTorch (11.6). Most likely this shouldn't be a problem.
warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
building 'simple_knn._C' extension
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\bin\Hostx64\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\User\miniconda3\envs\gaussian_splatting\lib\site-packages\torch\include -IC:\Users\User\miniconda3\envs\gaussian_splatting\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\User\miniconda3\envs\gaussian_splatting\lib\site-packages\torch\include\TH -IC:\Users\User\miniconda3\envs\gaussian_splatting\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\include" -IC:\Users\User\miniconda3\envs\gaussian_splatting\include -IC:\Users\User\miniconda3\envs\gaussian_splatting\Include /EHsc /Tpext.cpp /Fobuild\temp.win-amd64-cpython-37\Release\ext.obj /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc /wd4624 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0
ext.cpp
C:\Users\User\miniconda3\envs\gaussian_splatting\lib\site-packages\torch\include\torch\csrc\api\include\torch/cuda.h(5): fatal error C1083: Cannot open include file: 'cstdint': No such file or directory
error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.35.32215\\bin\\Hostx64\\x64\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for simple-knn
error: subprocess-exited-with-error
× Running setup.py install for simple-knn did not run successfully.
│ exit code: 1
╰─> [28 lines of output]
running install
C:\Users\User\miniconda3\envs\gaussian_splatting\lib\site-packages\setuptools\_distutils\cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!
********************************************************************************
Please avoid running ``setup.py`` directly.
Instead, use pypa/build, pypa/installer or other
standards-based tools.
See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
********************************************************************************
!!
self.initialize_options()
running build
running build_ext
C:\Users\User\miniconda3\envs\gaussian_splatting\lib\site-packages\torch\utils\cpp_extension.py:411: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
warnings.warn(msg.format('we could not find ninja.'))
C:\Users\User\miniconda3\envs\gaussian_splatting\lib\site-packages\torch\utils\cpp_extension.py:813: UserWarning: The detected CUDA version (11.8) has a minor version mismatch with the version that was used to compile PyTorch (11.6). Most likely this shouldn't be a problem.
warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
building 'simple_knn._C' extension
creating build
creating build\temp.win-amd64-cpython-37
creating build\temp.win-amd64-cpython-37\Release
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\bin\Hostx64\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\User\miniconda3\envs\gaussian_splatting\lib\site-packages\torch\include -IC:\Users\User\miniconda3\envs\gaussian_splatting\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\User\miniconda3\envs\gaussian_splatting\lib\site-packages\torch\include\TH -IC:\Users\User\miniconda3\envs\gaussian_splatting\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\include" -IC:\Users\User\miniconda3\envs\gaussian_splatting\include -IC:\Users\User\miniconda3\envs\gaussian_splatting\Include /EHsc /Tpext.cpp /Fobuild\temp.win-amd64-cpython-37\Release\ext.obj /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc /wd4624 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0
ext.cpp
C:\Users\User\miniconda3\envs\gaussian_splatting\lib\site-packages\torch\include\torch\csrc\api\include\torch/cuda.h(5): fatal error C1083: Cannot open include file: 'cstdint': No such file or directory
error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.35.32215\\bin\\Hostx64\\x64\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> simple-knn
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
failed
CondaEnvException: Pip failed