nerfstudio-project / gsplat

CUDA accelerated rasterization of gaussian splatting
https://docs.gsplat.studio/
Apache License 2.0
1.76k stars 219 forks source link

help!when I install gsplat in Windows10 #327

Open Greatest-Marx opened 1 month ago

Greatest-Marx commented 1 month ago

venv: torch2.1.2 cuda11.8 setuptools 69.5.3 I installed gsplat as the instructions ,but when I run pip install ., it gave me an error below: error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [160 lines of output] Setting MAX_JOBS to 10 running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-38 creating build\lib.win-amd64-cpython-38\gsplat copying gsplat\distributed.py -> build\lib.win-amd64-cpython-38\gsplat copying gsplat\profile.py -> build\lib.win-amd64-cpython-38\gsplat copying gsplat\relocation.py -> build\lib.win-amd64-cpython-38\gsplat copying gsplat\rendering.py -> build\lib.win-amd64-cpython-38\gsplat copying gsplat\utils.py -> build\lib.win-amd64-cpython-38\gsplat copying gsplat\version.py -> build\lib.win-amd64-cpython-38\gsplat copying gsplat_helper.py -> build\lib.win-amd64-cpython-38\gsplat copying gsplat__init.py -> build\lib.win-amd64-cpython-38\gsplat creating build\lib.win-amd64-cpython-38\gsplat\cuda copying gsplat\cuda_backend.py -> build\lib.win-amd64-cpython-38\gsplat\cuda copying gsplat\cuda_torch_impl.py -> build\lib.win-amd64-cpython-38\gsplat\cuda copying gsplat\cuda_wrapper.py -> build\lib.win-amd64-cpython-38\gsplat\cuda copying gsplat\cuda__init.py -> build\lib.win-amd64-cpython-38\gsplat\cuda creating build\lib.win-amd64-cpython-38\gsplat\cuda_legacy copying gsplat\cuda_legacy_backend.py -> build\lib.win-amd64-cpython-38\gsplat\cuda_legacy copying gsplat\cuda_legacy_torch_impl.py -> build\lib.win-amd64-cpython-38\gsplat\cuda_legacy copying gsplat\cuda_legacy_wrapper.py -> build\lib.win-amd64-cpython-38\gsplat\cuda_legacy copying gsplat\cuda_legacy\init__.py -> build\lib.win-amd64-cpython-38\gsplat\cuda_legacy creating build\lib.win-amd64-cpython-38\gsplat\strategy copying gsplat\strategy\base.py -> build\lib.win-amd64-cpython-38\gsplat\strategy copying gsplat\strategy\default.py -> build\lib.win-amd64-cpython-38\gsplat\strategy copying gsplat\strategy\mcmc.py -> build\lib.win-amd64-cpython-38\gsplat\strategy copying gsplat\strategy\ops.py -> build\lib.win-amd64-cpython-38\gsplat\strategy copying gsplat\strategy\init__.py -> build\lib.win-amd64-cpython-38\gsplat\strategy running egg_info writing gsplat.egg-info\PKG-INFO writing dependency_links to gsplat.egg-info\dependency_links.txt writing requirements to gsplat.egg-info\requires.txt writing top-level names to gsplat.egg-info\top_level.txt reading manifest file 'gsplat.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' adding license file 'LICENSE' writing manifest file 'gsplat.egg-info\SOURCES.txt' E:\Anaconda\envs\ns\lib\site-packages\setuptools\command\build_py.py:207: _Warning: Package 'gsplat.cuda.csrc' is absent from the packages configuration. !!

          ********************************************************************************
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'gsplat.cuda.csrc' as an importable package[^1],
          but it is absent from setuptools' `packages` configuration.

          This leads to an ambiguous overall configuration. If you want to distribute this
          package, please make sure that 'gsplat.cuda.csrc' is explicitly added
          to the `packages` configuration field.

          Alternatively, you can also rely on setuptools' discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).

          You can read more about "package discovery" on setuptools documentation page:

          - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

          If you don't want 'gsplat.cuda.csrc' to be distributed and are
          already explicitly excluding 'gsplat.cuda.csrc' via
          `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
          you can try to use `exclude_package_data`, or `include-package-data=False` in
          combination with a more fine grained `package-data` configuration.

          You can read more about "package data files" on setuptools documentation page:

          - https://setuptools.pypa.io/en/latest/userguide/datafiles.html

          [^1]: For Python, any directory (with suitable naming) can be imported,
                even if it does not contain any `.py` files.
                On the other hand, currently there is no concept of package data
                directory, all directories are treated like packages.
          ********************************************************************************

  !!
    check.warn(importable)
  E:\Anaconda\envs\ns\lib\site-packages\setuptools\command\build_py.py:207: _Warning: Package 'gsplat.cuda_legacy.csrc' is absent from the `packages` configuration.
  !!

          ********************************************************************************
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'gsplat.cuda_legacy.csrc' as an importable package[^1],
          but it is absent from setuptools' `packages` configuration.

          This leads to an ambiguous overall configuration. If you want to distribute this
          package, please make sure that 'gsplat.cuda_legacy.csrc' is explicitly added
          to the `packages` configuration field.

          Alternatively, you can also rely on setuptools' discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).

          You can read more about "package discovery" on setuptools documentation page:

          - https://setuptools.pypa.io/en/latest/userguide/package_discovery.html

          If you don't want 'gsplat.cuda_legacy.csrc' to be distributed and are
          already explicitly excluding 'gsplat.cuda_legacy.csrc' via
          `find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
          you can try to use `exclude_package_data`, or `include-package-data=False` in
          combination with a more fine grained `package-data` configuration.

          You can read more about "package data files" on setuptools documentation page:

          - https://setuptools.pypa.io/en/latest/userguide/datafiles.html

          [^1]: For Python, any directory (with suitable naming) can be imported,
                even if it does not contain any `.py` files.
                On the other hand, currently there is no concept of package data
                directory, all directories are treated like packages.
          ********************************************************************************

  !!
    check.warn(importable)
  creating build\lib.win-amd64-cpython-38\gsplat\cuda\csrc
  copying gsplat\cuda\csrc\bindings.h -> build\lib.win-amd64-cpython-38\gsplat\cuda\csrc
  copying gsplat\cuda\csrc\compute_relocation.cu -> build\lib.win-amd64-cpython-38\gsplat\cuda\csrc
  copying gsplat\cuda\csrc\compute_sh_bwd.cu -> build\lib.win-amd64-cpython-38\gsplat\cuda\csrc
  copying gsplat\cuda\csrc\compute_sh_fwd.cu -> build\lib.win-amd64-cpython-38\gsplat\cuda\csrc
  copying gsplat\cuda\csrc\ext.cpp -> build\lib.win-amd64-cpython-38\gsplat\cuda\csrc
  copying gsplat\cuda\csrc\fully_fused_projection_bwd.cu -> build\lib.win-amd64-cpython-38\gsplat\cuda\csrc
  copying gsplat\cuda\csrc\fully_fused_projection_fwd.cu -> build\lib.win-amd64-cpython-38\gsplat\cuda\csrc
  copying gsplat\cuda\csrc\fully_fused_projection_packed_bwd.cu -> build\lib.win-amd64-cpython-38\gsplat\cuda\csrc
  copying gsplat\cuda\csrc\fully_fused_projection_packed_fwd.cu -> build\lib.win-amd64-cpython-38\gsplat\cuda\csrc
  copying gsplat\cuda\csrc\helpers.cuh -> build\lib.win-amd64-cpython-38\gsplat\cuda\csrc
  copying gsplat\cuda\csrc\isect_tiles.cu -> build\lib.win-amd64-cpython-38\gsplat\cuda\csrc
  copying gsplat\cuda\csrc\persp_proj_bwd.cu -> build\lib.win-amd64-cpython-38\gsplat\cuda\csrc
  copying gsplat\cuda\csrc\persp_proj_fwd.cu -> build\lib.win-amd64-cpython-38\gsplat\cuda\csrc
  copying gsplat\cuda\csrc\quat_scale_to_covar_preci_bwd.cu -> build\lib.win-amd64-cpython-38\gsplat\cuda\csrc
  copying gsplat\cuda\csrc\quat_scale_to_covar_preci_fwd.cu -> build\lib.win-amd64-cpython-38\gsplat\cuda\csrc
  copying gsplat\cuda\csrc\rasterize_to_indices_in_range.cu -> build\lib.win-amd64-cpython-38\gsplat\cuda\csrc
  copying gsplat\cuda\csrc\rasterize_to_pixels_bwd.cu -> build\lib.win-amd64-cpython-38\gsplat\cuda\csrc
  copying gsplat\cuda\csrc\rasterize_to_pixels_fwd.cu -> build\lib.win-amd64-cpython-38\gsplat\cuda\csrc
  copying gsplat\cuda\csrc\spherical_harmonics.cuh -> build\lib.win-amd64-cpython-38\gsplat\cuda\csrc
  copying gsplat\cuda\csrc\types.cuh -> build\lib.win-amd64-cpython-38\gsplat\cuda\csrc
  copying gsplat\cuda\csrc\utils.cuh -> build\lib.win-amd64-cpython-38\gsplat\cuda\csrc
  copying gsplat\cuda\csrc\world_to_cam_bwd.cu -> build\lib.win-amd64-cpython-38\gsplat\cuda\csrc
  copying gsplat\cuda\csrc\world_to_cam_fwd.cu -> build\lib.win-amd64-cpython-38\gsplat\cuda\csrc
  creating build\lib.win-amd64-cpython-38\gsplat\cuda_legacy\csrc
  copying gsplat\cuda_legacy\csrc\CMakeLists.txt -> build\lib.win-amd64-cpython-38\gsplat\cuda_legacy\csrc
  copying gsplat\cuda_legacy\csrc\backward.cu -> build\lib.win-amd64-cpython-38\gsplat\cuda_legacy\csrc
  copying gsplat\cuda_legacy\csrc\backward.cuh -> build\lib.win-amd64-cpython-38\gsplat\cuda_legacy\csrc
  copying gsplat\cuda_legacy\csrc\bindings.cu -> build\lib.win-amd64-cpython-38\gsplat\cuda_legacy\csrc
  copying gsplat\cuda_legacy\csrc\bindings.h -> build\lib.win-amd64-cpython-38\gsplat\cuda_legacy\csrc
  copying gsplat\cuda_legacy\csrc\config.h -> build\lib.win-amd64-cpython-38\gsplat\cuda_legacy\csrc
  copying gsplat\cuda_legacy\csrc\ext.cpp -> build\lib.win-amd64-cpython-38\gsplat\cuda_legacy\csrc
  copying gsplat\cuda_legacy\csrc\forward.cu -> build\lib.win-amd64-cpython-38\gsplat\cuda_legacy\csrc
  copying gsplat\cuda_legacy\csrc\forward.cuh -> build\lib.win-amd64-cpython-38\gsplat\cuda_legacy\csrc
  copying gsplat\cuda_legacy\csrc\helpers.cuh -> build\lib.win-amd64-cpython-38\gsplat\cuda_legacy\csrc
  copying gsplat\cuda_legacy\csrc\sh.cuh -> build\lib.win-amd64-cpython-38\gsplat\cuda_legacy\csrc
  running build_ext
  **error: [WinError 2] 系统找不到指定的文件。
  [end of output]**

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for gsplat Running setup.py clean for gsplat Failed to build gsplat ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (gsplat)

I installed the package in x64 Native Tools Command Prompt for VS 2022 and initiated it in x64, but it still return the error.I tried all methods below this issue, but didnt work. Anybody can save this little boy? 0_0

KEMSHlM commented 4 weeks ago

I am in the same situation. I can run it after re-installing.

pip uninstall gsplat
pip install git+https://github.com/nerfstudio-project/gsplat.git@v1.2.0

When building the Docker image, this method does not work and I am looking for a solution.

My enviroment is cuda 11.8, torch 2.1.2, python 3.10

DuVogel87 commented 3 weeks ago

also looking for a solution here.

hnzhw commented 3 weeks ago
  1. conda create -n gsplat python=3.11
  2. conda activate gsplat
  3. Install pytorch (https://pytorch.org/get-started/previous-versions/) !!! Very important !!! conda install pytorch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 pytorch-cuda=11.8 -c pytorch -c nvidia
  4. Activate your Visual C++ environment: Navigate to the directory where vcvars64.bat is located. This path might vary depending on your installation. A common path is: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build Run the following command: set DISTUTILS_USE_SDK=1 vcvars64.bat
  5. md yourfolder
  6. git clone --recursive https://github.com/nerfstudio-project/gsplat.git
  7. cd gsplat
  8. pip install .

It works for me.