ModuleNotFoundError (Python)
In short: Python cannot find the imported module.
In more detail: The interpreter searches in sys.path.
In Depth
Possible causes
- Package not installed.
- Wrong virtual environment.
- Typo or file name equal to the module name.
Solutions
pip install packagenamein the right environment.- Use
python -m pipto make sure the same interpreter is used. - Do not name your own file like the module.
See also: Library