What is modulenotfounderror: no module named groundingdino in Python?
The ModuleNotFoundError: No module named ‘groundingdino’ error message occurs when Python is unable to find the module named ‘groundingdino’ in your Python environment.
This could be due to a few reasons:
- The module ‘groundingdino’ is not installed.
- The module name is misspelled.
- The module is not in the correct path.
What is ‘groundingdino’ in Python?
GroundingDINO is a Python module commonly utilized in the field of Artificial Intelligence.
The unique feature of this module is its ability to perform open-set object detection, which means it can identify objects that were not included in its training dataset.
This makes it especially valuable for tasks that require object detection based on linguistic descriptions.
An additional feature is its compatibility with Autodistill, which allows for the distillation of knowledge into a more compact model.
GroundingDINO can be installed using pip or can be downloaded directly from its GitHub repository.
How to fix modulenotfounderror: no module named groundingdino?

To fix the no module named groundingdino, you need to execute the following steps:
Step 1: Check the module name
Verify and make sure the module name is spelled correctly because there are some instances that you mispeleld it and it cause the error message.
Step 2: Install the groundingdino
If the module is not installed, you can install it using pip.
Use the following command:
pip install groundingdino
pip3 install groundingdinoYou can also install the module using conda:
conda install -c conda-forge groundingdino-pyYou can also install the module using the source:
git clone https://github.com/IDEA-Research/GroundingDINO.git
cd GroundingDINO/
pip install -e .Use the following command if you are using Anaconda:
conda install -c conda-forge groundingdino
Use the following command if you are using Jupyter Notebook:
!pip install groundingdino
Step 3: Check if the module is installed
To check if the module is installed, use the following command:
pip show pycryptodomeStep 4: Ensure the correct module path
The module should be in the correct directory for Python to find it.
Ensure the module is in a directory that is part of the Python path.
The current working directory and the directories listed in the PYTHONPATH environment variable are searched for modules.
Step 5: Check the pip version
Use the following command to check the pip version.
The version might be the reason why you are encountering this issue, especially if it’s not compatible with the module you are using
pip -Vor
pip3 -VIf pip is not available in PATH, use the following commands:
python -m pip -Vor
python3 -m pip -VStep 6: Check the version of Python
To check the version of Python you are currently using, use the following command:
Python -VAfter implementing these modifications, don’t forget to reboot your Python environment. If the issue continues, consider uninstalling and reinstalling Python, followed by reinstallation of the required modules.
If you’re utilizing a virtual environment, ensure that the module is installed in the appropriate environment.
Conclusion
The ModuleNotFoundError: No module named ‘groundingdino’ error message occurs when Python is unable to find the module named ‘groundingdino’ in your Python environment.
To fix this error, Ensure the groundingdino is installed in your Python env.
By following the guide above, there’s no doubt that you’ll be able to resolve this error quickly.
Please note that given steps above are general steps and the exact solution might vary depending on the specifics of your project and environment.
We hope that you’ve resolved the error with the help of this guide. Thank you for reading, and have fun coding!
Diagnostic checklist for “No module named ‘groundingdino'”
- Verify pip install target. Run
pip show groundingdino— if not installed, runpip install groundingdino. - Check the active Python interpreter.
which python(mac/Linux) orwhere python(Windows). Both pip and python must point to the same environment. - Check virtual environment activation. If you use venv/conda, activate before installing:
source .venv/bin/activate. - Rule out uppercase/lowercase. Python imports are case-sensitive:
import PyPDF2notimport pypdf2. - Rule out the pip-vs-package-name mismatch. Some packages install under a different name than you import (e.g.
pip install beautifulsoup4→import bs4).
Installing groundingdino
# Standard pip install pip install groundingdino # In a virtual environment (recommended) python -m venv .venv source .venv/bin/activate # or .venv\Scripts\activate on Windows pip install groundingdino # With uv (faster alternative) uv pip install groundingdino
Common causes for “No module named ‘groundingdino'”
- Python interpreter mismatch. Multiple Python installations can confuse pip. Verify with
which pythonandwhich pip. - Virtual environment not activated. If the venv isn’t activated, pip installs to your system Python instead.
- Notebook kernel mismatch. Jupyter uses a kernel that may differ from your terminal Python. Use
%pip install groundingdinoinside the notebook. - Import name differs from install name. pip install beautifulsoup4 → import bs4. Check the package’s PyPI page.
- Windows PATH issues. Ensure Python is on PATH; use
python -m pip installto invoke pip via the correct Python.
Working code example
# Verify install worked import groundingdino print(getattr(groundingdino, '__version__', 'no version attribute'))
Best practices
- Always use a virtual environment. Avoids most module-not-found errors.
- Use pip freeze to lock versions.
pip freeze > requirements.txtmakes your setup reproducible. - Consider uv or Poetry. Modern package managers with better dep resolution and reproducibility.
Official documentation
Frequently Asked Questions
What is Python ModuleNotFoundError and what causes it?
ModuleNotFoundError (a subclass of ImportError) is raised when Python cannot find the module you tried to import. Common causes: the package isn’t installed (pip install missing), wrong virtual environment activated, typo in module name, or Python can’t find your local module on the import path. The error message names exactly which module is missing.
How do I fix ‘ModuleNotFoundError: No module named X’?
Run pip install X first. If that succeeds but you still get the error, check which Python you’re using (which python OR python –version) vs which pip (which pip OR pip –version), they must match. Common gotcha: pip points to system Python 3.9 but you’re running python3.11 in a venv. Inside the venv, use python -m pip install X to be sure pip matches the active Python.
Why does my code work in one environment but not another?
Different Python versions or different installed packages. To diagnose: pip freeze > requirements.txt on the working environment, then pip install -r requirements.txt on the broken one. Use virtualenv (python -m venv venv) or conda for every project to avoid system-wide package collisions.
Is ModuleNotFoundError the same as ImportError?
ModuleNotFoundError is a subclass of ImportError added in Python 3.6. It specifically means ‘no such module exists.’ Plain ImportError covers a wider set: module exists but a name inside it can’t be imported (e.g. ‘cannot import name X from Y’). except ImportError catches both; except ModuleNotFoundError catches only the missing-module case.
Where can I find more ModuleNotFoundError fixes?
Browse the ModuleNotFoundError reference hub for 198+ specific module fixes (TensorFlow, Flask, Django, pandas, numpy, etc.). For related issues see ImportError. For broader Python setup see Python Tutorial hub.
