lkeab / gaussian-grouping

[ECCV'2024] Gaussian Grouping for open-world Anything reconstruction, segmentation and editing.
https://arxiv.org/abs/2312.00732
Apache License 2.0
679 stars 42 forks source link

An error when installing "GroundingDINO" #17

Open shubiao-xu opened 10 months ago

shubiao-xu commented 10 months ago

Thanks for open-sourcing your project! But there is an error when installing GroundingDINO by using command "python -m pip install -e GroundingDINO". The detail is as follows: ` error: subprocess-exited-with-error

× python setup.py develop did not run successfully. │ exit code: 1 ╰─> [48 lines of output] Building wheel groundingdino-0.1.0 Compiling with CUDA running develop D:\python\envs\gaussian_grouping2\lib\site-packages\setuptools\command\develop.py:40: EasyInstallDeprecationWarning: easy_install command is deprecated. !!

        ********************************************************************************
        Please avoid running ``setup.py`` and ``easy_install``.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://github.com/pypa/setuptools/issues/917 for details.
        ********************************************************************************

!!
  easy_install.initialize_options(self)
D:\python\envs\gaussian_grouping2\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 egg_info
writing groundingdino.egg-info\PKG-INFO
writing dependency_links to groundingdino.egg-info\dependency_links.txt
writing requirements to groundingdino.egg-info\requires.txt
writing top-level names to groundingdino.egg-info\top_level.txt
reading manifest file 'groundingdino.egg-info\SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'groundingdino.egg-info\SOURCES.txt'
running build_ext
building 'groundingdino._C' extension
Emitting ninja build file D:\PythonWorkplace\gaussian-grouping\Tracking-Anything-with-DEVA\Grounded-Segment-Anything\GroundingDINO\build\temp.win-amd64-cpython-310\Release\build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
1.10.2
creating D:\PythonWorkplace\gaussian-grouping\Tracking-Anything-with-DEVA\Grounded-Segment-Anything\GroundingDINO\build\lib.win-amd64-cpython-310
creating D:\PythonWorkplace\gaussian-grouping\Tracking-Anything-with-DEVA\Grounded-Segment-Anything\GroundingDINO\build\lib.win-amd64-cpython-310\groundingdino
"D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\link.exe" /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:D:\python\envs\gaussian_grouping2\lib\site-packages\torch\lib "/LIBPATH:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\lib\x64" /LIBPATH:D:\python\envs\gaussian_grouping2\libs /LIBPATH:D:\python\envs\gaussian_grouping2 /LIBPATH:D:\python\envs\gaussian_grouping2\PCbuild\amd64 "/LIBPATH:D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\ATLMFC\lib\x64" "/LIBPATH:D:\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64" c10.lib torch.lib torch_cpu.lib torch_python.lib cudart.lib c10_cuda.lib torch_cuda.lib /EXPORT:PyInit__C D:\PythonWorkplace\gaussian-grouping\Tracking-Anything-with-DEVA\Grounded-Segment-Anything\GroundingDINO\build\temp.win-amd64-cpython-310\Release\PythonWorkplace\gaussian-grouping\Tracking-Anything-with-DEVA\Grounded-Segment-Anything\GroundingDINO\groundingdino\models\GroundingDINO\csrc\MsDeformAttn\ms_deform_attn_cpu.obj D:\PythonWorkplace\gaussian-grouping\Tracking-Anything-with-DEVA\Grounded-Segment-Anything\GroundingDINO\build\temp.win-amd64-cpython-310\Release\PythonWorkplace\gaussian-grouping\Tracking-Anything-with-DEVA\Grounded-Segment-Anything\GroundingDINO\groundingdino\models\GroundingDINO\csrc\MsDeformAttn\ms_deform_attn_cuda.obj D:\PythonWorkplace\gaussian-grouping\Tracking-Anything-with-DEVA\Grounded-Segment-Anything\GroundingDINO\build\temp.win-amd64-cpython-310\Release\PythonWorkplace\gaussian-grouping\Tracking-Anything-with-DEVA\Grounded-Segment-Anything\GroundingDINO\groundingdino\models\GroundingDINO\csrc\cuda_version.obj D:\PythonWorkplace\gaussian-grouping\Tracking-Anything-with-DEVA\Grounded-Segment-Anything\GroundingDINO\build\temp.win-amd64-cpython-310\Release\PythonWorkplace\gaussian-grouping\Tracking-Anything-with-DEVA\Grounded-Segment-Anything\GroundingDINO\groundingdino\models\GroundingDINO\csrc\vision.obj /OUT:build\lib.win-amd64-cpython-310\groundingdino\_C.cp310-win_amd64.pyd /IMPLIB:D:\PythonWorkplace\gaussian-grouping\Tracking-Anything-with-DEVA\Grounded-Segment-Anything\GroundingDINO\build\temp.win-amd64-cpython-310\Release\PythonWorkplace\gaussian-grouping\Tracking-Anything-with-DEVA\Grounded-Segment-Anything\GroundingDINO\groundingdino\models\GroundingDINO\csrc\MsDeformAttn\_C.cp310-win_amd64.lib
LINK : fatal error LNK1181: 无法打开输入文件“.obj”
error: command 'D:\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\link.exe' failed with exit code 1181
[end of output]

` Could you please help me solve this problem or give me some suggestions?

ymq2017 commented 10 months ago

Hi, Since the error mentions CUDA (cudart.lib), you can check if you have the correct version of the CUDA Toolkit installed, as required by GroundingDINO. Compatibility between CUDA, PyTorch, and your GPU driver is usually crucial.

zxr-mhy commented 3 months ago

gaussian-grouping-main/Tracking-Anything-with-DEVA/Grounded-Segment-Anything/GroundingDINO/setup.py: cmdclass={"build_ext": torch.utils.cpp_extension.BuildExtension}, 修改为: cmdclass={'build_ext':torch.utils.cpp_extension.BuildExtension.with_options(use_ninja=False)},