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

Failed to install the compile the submodules on Windows 10 #842

Open
RuihanGao opened this issue Jun 7, 2024 · 4 comments
Open

Failed to install the compile the submodules on Windows 10 #842

RuihanGao opened this issue Jun 7, 2024 · 4 comments

Comments

@RuihanGao
Copy link

Hi,

Thanks for the great work!

I tried to install the environment on Windows with cuda 12.5 but failed to compile the submodules. (sorry for the long logs)

(GS) PS C:\Users\ruihan28\Documents\projects\gaussian-splatting> pip install submodules\diff-gaussian-rasterization
Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Processing c:\users\ruihan28\documents\projects\gaussian-splatting\submodules\diff-gaussian-rasterization
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: diff_gaussian_rasterization
  Building wheel for diff_gaussian_rasterization (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [13 lines of output]
      running bdist_wheel
      C:\Users\ruihan28\.conda\envs\GS\lib\site-packages\torch\utils\cpp_extension.py:499: 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-310
      creating build\lib.win-amd64-cpython-310\diff_gaussian_rasterization
      copying diff_gaussian_rasterization\__init__.py -> build\lib.win-amd64-cpython-310\diff_gaussian_rasterization
      running build_ext
      C:\Users\ruihan28\.conda\envs\GS\lib\site-packages\torch\utils\cpp_extension.py:384: UserWarning: Error checking compiler version for cl: [WinError 2] The system cannot find the file specified
        warnings.warn(f'Error checking compiler version for {compiler}: {error}')
      error: [WinError 2] The system cannot find the file specified
      [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
  Running setup.py clean for diff_gaussian_rasterization
Failed to build diff_gaussian_rasterization
ERROR: Could not build wheels for diff_gaussian_rasterization, which is required to install pyproject.toml-based projects

I also tried to add the Visual Studio path as people suggested. C:\Users\ruihan28\AppData\Local\Programs\Microsoft VS Code\binC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\bin\Hostx64\x64

 $Env:Path                                        
C:\Users\ruihan28\.conda\envs\GS;C:\Users\ruihan28\.conda\envs\GS\Library\mingw-w64\bin;C:\Users\ruihan28\.conda\envs\GS\Library\usr\bin;C:\Users\ruihan28\.conda\envs\GS\Library\bin;C:\Users\ruihan28\.conda\envs\GS\Scripts;C:\Users\ruihan28\.conda\envs\GS\bin;C:\Program Files\PowerShell\7;C:\tools\biggrep;C:\tools\gauntlet;C:\tools\remote_execution;C:\tools\js1;C:\tools\scsc;C:\tools\ar1;C:\Python38;C:\tools\fmenu\scripts;C:\ProgramData\chocolatey\lib\fb-dev-windows\bin;C:\tools\fbpython;C:\tools\fb-python\fb-python312;C:\tools\fb-python\fb-python310;C:\Python36\Scripts;C:\Python36;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\ProgramData\chocolatey\bin;C:\tools\arcanist\bin;C:\Program Files\Git\cmd;C:\opscode\inspec\bin;C:\tools\x2pagentd\bin;C:\tools\sks-agent;C:\Program Files\osquery;C:\Program Files\PowerShell\7;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\opscode\chef\bin;C:\tools\eden\bin;C:\tools\hg;C:\tools\scm-telemetry;C:\tools\watchman;C:\tools\p4;C:\tools\zstd;C:\ProgramData\anaconda3;C:\ProgramData\anaconda3\Scripts;C:\ProgramData\anaconda3\condabin;C:\Program Files\NVIDIA Corporation\Nsight Compute 2024.2.0;C:\Users\ruihan28\AppData\Local\Microsoft\WindowsApps;C:\Users\ruihan28\AppData\Local\Programs\Microsoft VS Code\binC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.40.33807\bin\Hostx64\x64

Here is my environment packages

(GS) PS C:\Users\ruihan28\Documents\projects\gaussian-splatting> conda list
# packages in environment at C:\Users\ruihan28\.conda\envs\GS:
#
# Name                    Version                   Build  Channel
bzip2                     1.0.8                h2bbff1b_6
ca-certificates           2024.6.2             h56e8100_0    conda-forge
filelock                  3.13.1                   pypi_0    pypi
fsspec                    2024.2.0                 pypi_0    pypi
intel-openmp              2021.4.0                 pypi_0    pypi
jinja2                    3.1.3                    pypi_0    pypi
libffi                    3.4.4                hd77b12b_1
markupsafe                2.1.5                    pypi_0    pypi
mkl                       2021.4.0                 pypi_0    pypi
mpmath                    1.3.0                    pypi_0    pypi
networkx                  3.2.1                    pypi_0    pypi
numpy                     1.26.3                   pypi_0    pypi
openssl                   3.3.1                h2466b09_0    conda-forge
pillow                    10.2.0                   pypi_0    pypi
pip                       24.0            py310haa95532_0
python                    3.10.14              he1021f5_1
setuptools                69.5.1          py310haa95532_0
sqlite                    3.45.3               h2bbff1b_0
sympy                     1.12                     pypi_0    pypi
tbb                       2021.11.0                pypi_0    pypi
tk                        8.6.14               h0416ee5_0
torch                     2.3.1+cu121              pypi_0    pypi
torchaudio                2.3.1+cu121              pypi_0    pypi
torchvision               0.18.1+cu121             pypi_0    pypi
typing-extensions         4.9.0                    pypi_0    pypi
tzdata                    2024a                h04d1e81_0
ucrt                      10.0.22621.0         h57928b3_0    conda-forge
vc                        14.2                 h2eaa2aa_1
vc14_runtime              14.40.33810         ha82c5b3_20    conda-forge
vs2015_runtime            14.40.33810         h3bf8584_20    conda-forge
vs2022_win-64             19.40.33808         h753ab0a_20    conda-forge
vswhere                   3.1.4                h57928b3_0    conda-forge
wheel                     0.43.0          py310haa95532_0
xz                        5.4.6                h8cc25b3_1
zlib                      1.2.13               h8cc25b3_1

Appreciate any help!

@RuihanGao
Copy link
Author

Update: I reinstall the environment so that cuda toolkit is installed after Visual Studio 2022, but the compilation fails with a slightly different error:

Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com
Processing c:\users\ruihan28\documents\projects\gaussian-splatting\submodules\diff-gaussian-rasterization
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: diff_gaussian_rasterization
  Building wheel for diff_gaussian_rasterization (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      running bdist_wheel
      C:\Users\ruihan28\.conda\envs\gs\lib\site-packages\torch\utils\cpp_extension.py:500: 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-310
      creating build\lib.win-amd64-cpython-310\diff_gaussian_rasterization
      copying diff_gaussian_rasterization\__init__.py -> build\lib.win-amd64-cpython-310\diff_gaussian_rasterization
      running build_ext
      building 'diff_gaussian_rasterization._C' extension
      creating build\temp.win-amd64-cpython-310
      creating build\temp.win-amd64-cpython-310\Release
      creating build\temp.win-amd64-cpython-310\Release\cuda_rasterizer
      "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\nvcc" -c cuda_rasterizer/backward.cu -o build\temp.win-amd64-cpython-310\Release\cuda_rasterizer/backward.obj -IC:\Users\ruihan28\.conda\envs\gs\lib\site-packages\torch\include -IC:\Users\ruihan28\.conda\envs\gs\lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\ruihan28\.conda\envs\gs\lib\site-packages\torch\include\TH -IC:\Users\ruihan28\.conda\envs\gs\lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include" -IC:\Users\ruihan28\.conda\envs\gs\include -IC:\Users\ruihan28\.conda\envs\gs\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\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" -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 /wd4068 -Xcompiler /wd4067 -Xcompiler /wd4624 -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 -IC:\Users\ruihan28\Documents\projects\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 -std=c++17 --use-local-env
      C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include\crt/host_config.h(153): fatal error C1189: #error:  -- unsupported Microsoft Visual Studio version! Only the versions between 2017 and 2022 (inclusive) are supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
      backward.cu
      error: command 'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.1\\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
  Running setup.py clean for diff_gaussian_rasterization
Failed to build diff_gaussian_rasterization
ERROR: Could not build wheels for diff_gaussian_rasterization, which is required to install pyproject.toml-based projects


@jonstephens85
Copy link

I don't have a solution, however, the issue you are running into is that the lastest version of VS2022 and Cuda Toolkit 11.8 are not compatible with each other. This is a big issue for building many of these gaussian splatting projects at the moment. You would need to use CUDA Toolkit 12.x which by default has issues with this project. This problem popped up when VS2022 had an update in late May 2024. Maybe someone on here has a solution.

@Fanie-Visagie
Copy link

Here is the only link I could find to download VS 2019 Community edition...

https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=16

@amballa
Copy link

amballa commented Jun 28, 2024

Vs

Here is the only link I could find to download VS 2019 Community edition...

https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=16

Thanks you! Worked for me using this version

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

4 participants