Open Rishi1395 opened 1 year ago
I am facing the same issue.
same here
If you are getting this error fatal error C1083: Cannot open include file: 'crtdefs.h': No such file or directory Try this solution https://github.com/graphdeco-inria/gaussian-splatting/issues/148 Basically adding this to path also. Worked for me first it was cl.exe it was solved via adding path then this crtdefs.h
Quick note: I actually encountered this exact error myself recently. Not with this project, but when trying to build Instant NGP on a PC that hadn't been updated in some time. A good idea if the error message is cryptic and not covered by the tutorials: update the involved software. Updating Visual Studio to the latest version worked for me in this case.
If you are getting this error fatal error C1083: Cannot open include file: 'crtdefs.h': No such file or directory Try this solution #148 Basically adding this to path also. Worked for me first it was cl.exe it was solved via adding path then this crtdefs.h
Yes try adding as many paths as possible, it fixed my issue on another machine;
If you are getting this error fatal error C1083: Cannot open include file: 'crtdefs.h': No such file or directory Try this solution #148 Basically adding this to path also. Worked for me first it was cl.exe it was solved via adding path then this crtdefs.h
I'll give this a try
Okay, I tried this also but was not able to get it fixed. Do you mind connecting with me on Discord and helping me out?
Guys make sure "MSVC v142 - VS 2019 C++ ARM64...." is added to VS2019.
Then add crtdefs.h and cl.exe to the PATH. It was: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64
Then make sure to restart the computer. Doing all these worked for me.
It still fails for me. Idk where am I going wrong right now. I need someone to guide me through screen share or TeamViewer.
I encountered these issues on two of my computers. I've tried everything and followed all the suggestions I found here (such as #146): VS 2019 is up to date, all necessary packages are installed, PATH is correctly defined, etc., but I was still facing these errors.
What solved the issue for me was:
conda install -c anaconda vs2019_win-64
This package is a metapackage that ensures that the Visual Studio 2019 build tools are available and sets the necessary environment variables
I encountered these issues on two of my computers. I've tried everything and followed all the suggestions I found here (such as #146): VS 2019 is up to date, all necessary packages are installed, PATH is correctly defined, etc., but I was still facing these errors.
What solved the issue for me was:
* Activating my Conda environment. * Installing the vs2019_win-64 package.
conda install -c anaconda vs2019_win-64
This package is a metapackage that ensures that the Visual Studio 2019 build tools are available and sets the necessary environment variables
Guys, do what smallfly says. It worked! Almost unexpectedly at this point. Thanks!
I already had VS2022 installed and didn't want to install VS2019. The meta package was the last missing piece for me as well since it appears to tell conda where to find the system include files. Of course, I needed one for 2022 rather than 2019.
For anyone else who comes looking for it, this is the one that worked for me:
conda install -c conda-forge vs2022_win-64
OMG thank you my hero 👍
I already had VS2022 installed and didn't want to install VS2019. The meta package was the last missing piece for me as well since it appears to tell conda where to find the system include files. Of course, I needed one for 2022 rather than 2019.
For anyone else who comes looking for it, this is the one that worked for me:
conda install -c conda-forge vs2022_win-64
For my environment with VS2022, this worked! No install error.
I encountered these issues on two of my computers. I've tried everything and followed all the suggestions I found here (such as #146): VS 2019 is up to date, all necessary packages are installed, PATH is correctly defined, etc., but I was still facing these errors.
What solved the issue for me was:
- Activating my Conda environment.
- Installing the vs2019_win-64 package.
conda install -c anaconda vs2019_win-64
This package is a metapackage that ensures that the Visual Studio 2019 build tools are available and sets the necessary environment variables
This works for me!! Thanks!
Worked for me too! I updated the environment according to the environment.yml file afterwards to make sure nothing was uninstalled:
After unsuccessfully running: conda env create --file environment.yml
following Smallfly's steps:
conda activate gaussian_splatting conda install -c anaconda vs2019_win-64 then conda env update --file environment.yml
Thank you!!
I don't use conda but "python -m venv" for virtual environment, running "vcvarsall.bat" before pip install solved my issue.
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsall.bat"
cd gaussian-splatting
pip install submodules/diff-gaussian-rasterization
pip install submodules/simple-knn
I need someone's help with this. Please help me to figure out why my Pip Dependencies installation is failing even though I tried adding the visual studio path to my environment variables path user variable according to @henrypearce4D; C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64
I get this in cmd. C:\Users\Rishi's PC\gaussian-splatting>conda env create --file environment.yml Retrieving notices: ...working... done Collecting package metadata (repodata.json): done Solving environment: done
==> WARNING: A newer version of conda exists. <== current version: 23.3.1 latest version: 23.7.3
Please update conda by running
Or to minimize the number of packages updated during conda update use
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: ['D:\Software\Anaconda3\envs\gaussian_splatting\python.exe', '-m', 'pip', 'install', '-U', '-r', "C:\Users\Rishi's PC\gaussian-splatting\condaenv.ptcw49rq.requirements.txt", '--exists-action=b'] Pip subprocess output: Processing c:\users\rishi's pc\gaussian-splatting\submodules\diff-gaussian-rasterization Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Processing c:\users\rishi's pc\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 D:\Software\Anaconda3\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 D:\Software\Anaconda3\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 -ID:\Software\Anaconda3\envs\gaussian_splatting\lib\site-packages\torch\include -ID:\Software\Anaconda3\envs\gaussian_splatting\lib\site-packages\torch\include\torch\csrc\api\include -ID:\Software\Anaconda3\envs\gaussian_splatting\lib\site-packages\torch\include\TH -ID:\Software\Anaconda3\envs\gaussian_splatting\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\include" -ID:\Software\Anaconda3\envs\gaussian_splatting\include -ID:\Software\Anaconda3\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 -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr "-IC:\Users\Rishi's PC\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_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 --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 ╰─> [15 lines of output] running bdist_wheel D:\Software\Anaconda3\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 D:\Software\Anaconda3\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 (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -ID:\Software\Anaconda3\envs\gaussian_splatting\lib\site-packages\torch\include -ID:\Software\Anaconda3\envs\gaussian_splatting\lib\site-packages\torch\include\torch\csrc\api\include -ID:\Software\Anaconda3\envs\gaussian_splatting\lib\site-packages\torch\include\TH -ID:\Software\Anaconda3\envs\gaussian_splatting\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\include" -ID:\Software\Anaconda3\envs\gaussian_splatting\include -ID:\Software\Anaconda3\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 D:\Software\Anaconda3\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 (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\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 D:\Software\Anaconda3\envs\gaussian_splatting\lib\site-packages\setuptools_distutils\cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. !!
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