hbb1 / 2d-gaussian-splatting

[SIGGRAPH'24] 2D Gaussian Splatting for Geometrically Accurate Radiance Fields
https://surfsplatting.github.io
Other
1.59k stars 79 forks source link

could not install diff-surfels-rasterization #10

Open AnudhinaDhanabalan opened 1 month ago

AnudhinaDhanabalan commented 1 month ago

i could not install the diff-surfrel-rasterization submodule,is there any troubleshooting tha tcan work ? thanks !!

hbb1 commented 1 month ago

Hi. What was the error message there? It will be helpful in locating the errors given a detailed description.

AnudhinaDhanabalan commented 1 month ago

this was the error

Traceback (most recent call last): File "train.py", line 16, in from gaussian_renderer import render, network_gui File "C:\Users\ghost\2d-gaussian-splatting\gaussian_renderer__init__.py", line 14, in from diff_surfel_rasterization import GaussianRasterizationSettings, GaussianRasterizer ModuleNotFoundError: No module named 'diff_surfel_rasterization' (gs2) PS C:\Users\ghost\2d-gaussian-splatting> pip install .\submodules\diff-surfel-rasterization\ Processing c:\users\ghost\2d-gaussian-splatting\submodules\diff-surfel-rasterization Preparing metadata (setup.py) ... done Building wheels for collected packages: diff-surfel-rasterization Building wheel for diff-surfel-rasterization (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [5 lines of output] running bdist_wheel running build running build_py running build_ext 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-surfel-rasterization Running setup.py clean for diff-surfel-rasterization Failed to build diff-surfel-rasterization Installing collected packages: diff-surfel-rasterization Running setup.py install for diff-surfel-rasterization ... error error: subprocess-exited-with-error

× Running setup.py install for diff-surfel-rasterization did not run successfully. │ exit code: 1 ╰─> [22 lines of output] running install C:\Users\ghost\anaconda3\envs\gs2\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_py
  creating build
  creating build\lib.win-amd64-cpython-37
  creating build\lib.win-amd64-cpython-37\diff_surfel_rasterization
  copying diff_surfel_rasterization\__init__.py -> build\lib.win-amd64-cpython-37\diff_surfel_rasterization
  running build_ext
  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: legacy-install-failure

× Encountered error while trying to install package. ╰─> diff-surfel-rasterization

note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

henrypearce4D commented 1 month ago

I also cant install this submodule, I'm also using windows. Has the installation been tested on windows?

pani-vishal commented 1 month ago

Can I ask what your python and setuptools version are for that environment? This might be helpful: https://stackoverflow.com/questions/73257839/setup-py-install-is-deprecated-warning-shows-up-every-time-i-open-a-terminal-i

hbb1 commented 1 month ago

Super thanks to @pani-vishal It worths a try. I haven't tested on Windows because I don't have one at hand. I also search some related solutions from 3DGS's repo for Windows, hoping it will help https://github.com/graphdeco-inria/gaussian-splatting?tab=readme-ov-file#faq

CDchenlin commented 1 month ago

Hi! I have tried to install the diff_surfel_rasterization submodule on Linux, and I also have some errors as follows

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for diff_surfel_rasterization Running setup.py clean for diff_surfel_rasterization Failed to build diff_surfel_rasterization ERROR: Could not build wheels for diff_surfel_rasterization, which is required to install pyproject.toml-based projects

hbb1 commented 1 month ago

You can try to upgrade your pip and run pip install pyproject-toml

CDchenlin commented 1 month ago

Thank you for your reply, however it seems not solving the problem. I wonder if I can directly use the conda environment of 3DGS? I am not sure if there are any modifications of the submodule, as my purpose is to extract the mesh.

xuncpp commented 1 month ago

Thanks for your great work! But I encountered the same problem,I follow your advice:1.!pip install --upgrade pip and Successfully installed pip-24.0; 2.!pip install pyproject-toml and Successfully installed pyproject-toml-0.0.10.In addition setuptools rsion is 67.7.2. But unfortunately it still didn’t work.

Processing ./submodules/diff-surfel-rasterization Preparing metadata (setup.py) ... done Building wheels for collected packages: diff-surfel-rasterization error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip. Building wheel for diff-surfel-rasterization (setup.py) ... error ERROR: Failed building wheel for diff-surfel-rasterization Running setup.py clean for diff-surfel-rasterization Failed to build diff-surfel-rasterization ERROR: Could not build wheels for diff-surfel-rasterization, which is required to install pyproject.toml-based projects

Thanks again to the author, hope someone can tell me how to solve this problem!

CDchenlin commented 1 month ago

Hi @xuncpp

I have solved this problem by refering to this issue . Hope it can help you.

RobinRenggli commented 1 month ago

Might be related:

I also had trouble installing the submodule, in my case the reason was the file 2d-gaussian-splatting\submodules\diff-surfel-rasterization\rasterize_points.cu

The way the CHECK_INPUT is defined on line 28 lead to compilation errors. This can be fixed by either adjusting your compilation settings, or by just removing all the lines containing CHECK_INPUT, since this seems to mostly be a leftover for debugging reasons. After removing those lines, I managed to compile the submodule.

LionelWXY commented 1 month ago

I meet the similar issue on windows10, and this may be useful. I slove this problem through 1. removing all the lines containing CHECK_INPUT in 2d-gaussian-splatting\submodules\diff-surfel-rasterization\rasterize_points.cu. 2. changing code " 'build_ext': BuildExtension " to " 'build_ext': BuildExtension.with_options(use_ninja=False) " in 2d-gaussian-splatting\submodules\diff-surfel-rasterization\setup.py

henrypearce4D commented 1 month ago

I meet the similar issue on windows10, and this may be useful. I slove this problem through 1. removing all the lines containing CHECK_INPUT in 2d-gaussian-splatting\submodules\diff-surfel-rasterization\rasterize_points.cu. 2. changing code " 'build_ext': BuildExtension " to " 'build_ext': BuildExtension.with_options(use_ninja=False) " in 2d-gaussian-splatting\submodules\diff-surfel-rasterization\setup.py

@LionelWXY solved the issue for me! thankyou!!

Edit:

It installed but looks like it caused issues doing that;

Traceback (most recent call last):
  File "train.py", line 16, in <module>
    from gaussian_renderer import render, network_gui
  File "C:\2d-gaussian-splatting\gaussian_renderer\__init__.py", line 15, in <module>
    from scene.gaussian_model import GaussianModel
  File "C:\2d-gaussian-splatting\scene\__init__.py", line 16, in <module>
    from scene.dataset_readers import sceneLoadTypeCallbacks
  File "C:\2d-gaussian-splatting\scene\dataset_readers.py", line 24, in <module>
    from scene.gaussian_model import BasicPointCloud
  File "C:\2d-gaussian-splatting\scene\gaussian_model.py", line 20, in <module>
    from simple_knn._C import distCUDA2
ImportError: DLL load failed while importing _C: The specified procedure could not be found.
LionelWXY commented 1 month ago

I meet the similar issue on windows10, and this may be useful. I slove this problem through 1. removing all the lines containing CHECK_INPUT in 2d-gaussian-splatting\submodules\diff-surfel-rasterization\rasterize_points.cu. 2. changing code " 'build_ext': BuildExtension " to " 'build_ext': BuildExtension.with_options(use_ninja=False) " in 2d-gaussian-splatting\submodules\diff-surfel-rasterization\setup.py

@LionelWXY solved the issue for me! thankyou!!

Edit:

It installed but looks like it caused issues doing that;

Traceback (most recent call last):
  File "train.py", line 16, in <module>
    from gaussian_renderer import render, network_gui
  File "C:\2d-gaussian-splatting\gaussian_renderer\__init__.py", line 15, in <module>
    from scene.gaussian_model import GaussianModel
  File "C:\2d-gaussian-splatting\scene\__init__.py", line 16, in <module>
    from scene.dataset_readers import sceneLoadTypeCallbacks
  File "C:\2d-gaussian-splatting\scene\dataset_readers.py", line 24, in <module>
    from scene.gaussian_model import BasicPointCloud
  File "C:\2d-gaussian-splatting\scene\gaussian_model.py", line 20, in <module>
    from simple_knn._C import distCUDA2
ImportError: DLL load failed while importing _C: The specified procedure could not be found.

Hi there, I think your new issue may have nothing to do with the installation process of submodules\diff-surfel-rasterization. You may check other parts of your installation process related to CUDA. @henrypearce4D

xuncpp commented 1 month ago

Hi @xuncpp

I have solved this problem by refering to this issue . Hope it can help you.

Thank you for your help! But it may not be the reason for cuda version for me. I configured it according to LionelWXY's answer.

xuncpp commented 1 month ago

I meet the similar issue on windows10, and this may be useful. I slove this problem through 1. removing all the lines containing CHECK_INPUT in 2d-gaussian-splatting\submodules\diff-surfel-rasterization\rasterize_points.cu. 2. changing code " 'build_ext': BuildExtension " to " 'build_ext': BuildExtension.with_options(use_ninja=False) " in 2d-gaussian-splatting\submodules\diff-surfel-rasterization\setup.py

Thank you very much for your answer! ! I successfully followed this method locally! But this method does not work on colab. I don’t quite understand the principle. I would be grateful if you could answer me.

linharrrrrt commented 1 month ago

I successfully completed the installation using the following steps, and I hope it can help everyone:

1. I used the environment from 3DGS https://github.com/graphdeco-inria/gaussian-splatting for the installation, using the commands below:

git clone https://github.com/graphdeco-inria/gaussian-splatting --recursive #This command is necessary to download the complete code, including all the files needed under submodules
SET DISTUTILS_USE_SDK=1 # Windows only
conda env create --file environment.yml
conda activate gaussian_splatting

Then, I successfully installed the gaussian_splatting environment and entered it.

2. I downloaded the code for this project, using the commands below, noting that I was already in the gaussian_splatting environment:

git clone https://github.com/hbb1/2d-gaussian-splatting.git --recursive #This command is necessary to download the complete code, including all the files needed under submodules
pip install submodules/diff-surfel-rasterization

Then, I successfully installed the diff-surfel-rasterization for this project.

chonglou1988 commented 3 weeks ago

Need help!!!, cannot install diff-surfels-rasterization and have been trapped here for more than 3 days. Have tried to install different cuda and torch versions, have tried different setuptools versions, also install and uninstall VS code several times. Below is new errors. Thanks very much for your help in advance! D:\anaconda3\envs\surfel_splatting\lib\site-packages\torch\include\pybind11\cast.h(1219) : fatal error C1001: 内部编译器错误。 (编译器文件“D:\a_work\1\s\src\vctools\Compiler\Utc\src\p2\main.c”,第 242 行) 要解决此问题,请尝试简化或更改上面所列位置附近的程序。 如果可以,请在此处提供重现步骤: https://developercommunity.visualstudio.com 请选择 Visual C++ “帮助”菜单上的“技术支持”命令,或打开技术支持帮助文件来获得详细信息。 link!RaiseException()+0x62 link!RaiseException()+0x62 link!InvokeCompilerPass()+0x7d08 link!InvokeCompilerPassW()+0x7eedc link!InvokeCompilerPassW()+0x19bffa

error: command 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX86\x64\link.exe' failed with exit code 3765260340