I am trying to install the GroundingDino as instructed in the README file of their official GitHub repo, but I am facing the error below:
Obtaining file:///home/kgupta/workspace/Synthetic_Data_gen/Annotation_Agent/models/GroundingDINO
Preparing metadata (setup.py) ... done
...
Installing collected packages: groundingdino
DEPRECATION: Legacy editable install of groundingdino==0.1.0 from file:///home/kgupta/workspace/Synthetic_Data_gen/Annotation_Agent/models/GroundingDINO (setup.py develop) is deprecated. pip 25.3 will enforce this behaviour change. A possible replacement is to add a pyproject.toml or enable --use-pep517, and use setuptools >= 64. If the resulting installation is not behaving as expected, try using --config-settings editable_mode=compat. Please consult the setuptools documentation for more information. Discussion can be found at https://github.com/pypa/pip/issues/11457
Running setup.py develop for groundingdino
error: subprocess-exited-with-error
× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [97 lines of output]
Building wheel groundingdino-0.1.0
Compiling with CUDA
running develop
/home/kgupta/workspace/Synthetic_Data_gen/Annotation_Agent/annotationagent/lib/python3.11/site-packages/setuptools/_distutils/cmd.py:90: DevelopDeprecationWarning: develop command is deprecated.
!!
********************************************************************************
Please avoid running ``setup.py`` and ``develop``.
Instead, use standards-based tools like pip or uv.
By 2025-Oct-31, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://github.com/pypa/setuptools/issues/917 for details.
********************************************************************************
!!
self.initialize_options()
Obtaining file:///home/kgupta/workspace/Synthetic_Data_gen/Annotation_Agent/models/GroundingDINO
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Checking if build backend supports build_editable: started
Checking if build backend supports build_editable: finished with status 'done'
Getting requirements to build editable: started
Getting requirements to build editable: finished with status 'error'
error: subprocess-exited-with-error
× Getting requirements to build editable did not run successfully.
│ exit code: 1
╰─> [33 lines of output]
/home/kgupta/workspace/Synthetic_Data_gen/Annotation_Agent/annotationagent/bin/python3: No module named pip
Traceback (most recent call last):
File "<string>", line 32, in install_torch
ModuleNotFoundError: No module named 'torch'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/kgupta/workspace/Synthetic_Data_gen/Annotation_Agent/annotationagent/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
main()
File "/home/kgupta/workspace/Synthetic_Data_gen/Annotation_Agent/annotationagent/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
json_out["return_val"] = hook(**hook_input["kwargs"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kgupta/workspace/Synthetic_Data_gen/Annotation_Agent/annotationagent/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 157, in get_requires_for_build_editable
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-ozwbekvd/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 473, in get_requires_for_build_editable
return self.get_requires_for_build_wheel(config_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-ozwbekvd/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-ozwbekvd/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-ozwbekvd/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 512, in run_setup
super().run_setup(setup_script=setup_script)
File "/tmp/pip-build-env-ozwbekvd/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 317, in run_setup
exec(code, locals())
File "<string>", line 37, in <module>
File "<string>", line 34, in install_torch
File "/home/kgupta/miniconda3/lib/python3.11/subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/kgupta/workspace/Synthetic_Data_gen/Annotation_Agent/annotationagent/bin/python3', '-m', 'pip', 'install', 'torch']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build editable 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.
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 35, in <module>
File "/home/kgupta/workspace/Synthetic_Data_gen/Annotation_Agent/models/GroundingDINO/setup.py", line 204, in <module>
setup(
File "/home/kgupta/workspace/Synthetic_Data_gen/Annotation_Agent/annotationagent/lib/python3.11/site-packages/setuptools/__init__.py", line 115, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kgupta/workspace/Synthetic_Data_gen/Annotation_Agent/annotationagent/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 186, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "/home/kgupta/workspace/Synthetic_Data_gen/Annotation_Agent/annotationagent/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 202, in run_commands
dist.run_commands()
File "/home/kgupta/workspace/Synthetic_Data_gen/Annotation_Agent/annotationagent/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 1002, in run_commands
self.run_command(cmd)
File "/home/kgupta/workspace/Synthetic_Data_gen/Annotation_Agent/annotationagent/lib/python3.11/site-packages/setuptools/dist.py", line 1102, in run_command
super().run_command(command)
File "/home/kgupta/workspace/Synthetic_Data_gen/Annotation_Agent/annotationagent/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command
cmd_obj.run()
File "/home/kgupta/workspace/Synthetic_Data_gen/Annotation_Agent/annotationagent/lib/python3.11/site-packages/setuptools/command/develop.py", line 39, in run
subprocess.check_call(cmd)
File "/home/kgupta/miniconda3/lib/python3.11/subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/kgupta/workspace/Synthetic_Data_gen/Annotation_Agent/annotationagent/bin/python3', '-m', 'pip', 'install', '-e', '.', '--use-pep517', '--no-deps']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
Here, I pasted the error that I have been facing while installing GroundingDino as instructed in their official git repo: https://github.com/IDEA-Research/GroundingDINO?tab=readme-ov-file.
I have performed everything as they said in my local device- from setting up the $CUDA_HOME path to installing the package as instructed in their README file.
GroundingDino installation instruction from their README file:
git clone https://github.com/IDEA-Research/GroundingDINO.git
cd GroundingDINO/
pip install -e .
I faced the error after the terminal's pip install -e . command.
I then tried to install GroundingDino in a colab notebook, but there I also faced an error while using the A100 GPU. The error that I faced in colab is below as well:
/content
Cloning into 'GroundingDINO'...
remote: Enumerating objects: 463, done.
remote: Total 463 (delta 0), reused 0 (delta 0), pack-reused 463 (from 1)
Receiving objects: 100% (463/463), 12.91 MiB | 17.96 MiB/s, done.
Resolving deltas: 100% (220/220), done.
/content/GroundingDINO
Preparing metadata (setup.py) ... done
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 46.8/46.8 kB 3.5 MB/s eta 0:00:00
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 207.2/207.2 kB 15.7 MB/s eta 0:00:00
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 256.2/256.2 kB 22.9 MB/s eta 0:00:00
error: subprocess-exited-with-error
× python setup.py develop 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.
error: subprocess-exited-with-error
× python setup.py develop 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.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 89.8/89.8 kB 8.3 MB/s eta 0:00:00
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 66.8/66.8 kB 6.0 MB/s eta 0:00:00
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 49.9/49.9 MB 51.3 MB/s eta 0:00:00
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.4/1.4 MB 70.0 MB/s eta 0:00:00
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.2/4.2 MB 114.2 MB/s eta 0:00:00
I have already tried:
- upgrading the pip version within my virtual environment.
- tried upgrading the setuptools,
pip install --upgrade setuptools wheel, and - I have tried performing a fresh installation of the entire
GroundingDinopackage
But none of these has found me a solution.
How to resolve this?