4d-gaussian-splatting icon indicating copy to clipboard operation
4d-gaussian-splatting copied to clipboard

diff-gaussian-rasterization cannot build during training

Open pengcanon opened this issue 1 year ago • 7 comments

Hello, I'm trying to run your code before digging into the details of the model, but ran into problems when attempting to train on some sample dataset. I've installed everything needed and followed the instructions. But diff_gaussian_rasterization wouldn't build form the train.py script. I also tried building it inside the diff_gaussian_rasterization folder by running python setup.py with no success. This is puzzeling as I'm able to install diff_gaussian_rasterization in my other forked repo such as the original 3d gaussian splatting and a few other 4d GP projects, so i'm sure the dependencies are set correctly.

File "C:\Users\CanonUser\Documents\GitHub\4d-gaussian-splatting2024\train.py", line 17, in from gaussian_renderer import render File "C:\Users\CanonUser\Documents\GitHub\4d-gaussian-splatting2024\gaussian_renderer_init_.py", line 15, in from .diff_gaussian_rasterization import GaussianRasterizationSettings, GaussianRasterizer File "C:\Users\CanonUser\Documents\GitHub\4d-gaussian-splatting2024\gaussian_renderer\diff_gaussian_rasterization.py", line 19, in _C = load( File "C:\Users\CanonUser\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\utils\cpp_extension.py", line 1284, in load return _jit_compile( File "C:\Users\CanonUser\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\utils\cpp_extension.py", line 1509, in _jit_compile _write_ninja_file_and_build_library( File "C:\Users\CanonUser\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\utils\cpp_extension.py", line 1624, in _write_ninja_file_and_build_library _run_ninja_build( File "C:\Users\CanonUser\AppData\Local\Programs\Python\Python39\lib\site-packages\torch\utils\cpp_extension.py", line 1909, in _run_ninja_build raise RuntimeError(message) from e RuntimeError: Error building extension 'diff_gaussian_rasterization'

pengcanon avatar Jan 22 '24 18:01 pengcanon

I had this issue yesterday and solved it by installing CUDA 11.8. It seems that the extension requires that version.

Hope that helps you!

antithing avatar Jan 23 '24 13:01 antithing

I had this issue yesterday and solved it by installing CUDA 11.8. It seems that the extension requires that version.

Hope that helps you!

Thank you for the suggestion. I do have cuda 11.8 installed all time round, but this error persists. I also checked my path and its there too, confirmed by nvcc --version that gives me 11.8. Tried pip install from the command line under the main directory but got a slight more informative error message after successfully lanching setup.py and creating the egg-info folder: " No such file or directory: 'diff_gaussian_rasterization' Any other thoughts?

pengcanon avatar Jan 23 '24 17:01 pengcanon

What happens if you cd into the diff_gaussian_rasterization directory and run:

python setup.py install

antithing avatar Jan 23 '24 18:01 antithing

What happens if you cd into the diff_gaussian_rasterization directory and run:

python setup.py install

This is what I get: running install running bdist_egg running egg_info creating diff_gaussian_rasterization.egg-info writing diff_gaussian_rasterization.egg-info\PKG-INFO writing dependency_links to diff_gaussian_rasterization.egg-info\dependency_links.txt writing top-level names to diff_gaussian_rasterization.egg-info\top_level.txt writing manifest file 'diff_gaussian_rasterization.egg-info\SOURCES.txt' error: package directory 'diff_gaussian_rasterization' does not exist

pengcanon avatar Jan 23 '24 20:01 pengcanon

@antithing same here

cmh1027 avatar Feb 07 '24 08:02 cmh1027

I faced same error. After installing ninja with pip install ninja, it was solved.

raven38 avatar Feb 09 '24 06:02 raven38

Finally! I can run the project! About why my project face such error: - I installed the Qt and add Qt mingw in env var Path! If after you type "gcc -v" or "g++ -v", the output is mingw, pls delete it in your env var!!!! - Make sure add the VS hostx64 into your env var!

Fang2896 avatar Mar 12 '24 06:03 Fang2896