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

An error when installing "GroundingDINO" #17

Open
shubiao-xu opened this issue Jan 17, 2024 · 2 comments
Open

An error when installing "GroundingDINO" #17

shubiao-xu opened this issue Jan 17, 2024 · 2 comments

Comments

@shubiao-xu
Copy link

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
Copy link
Collaborator

ymq2017 commented Jan 23, 2024

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
Copy link

zxr-mhy commented Aug 22, 2024

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)},

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

3 participants