ModuleNotFoundError: No module named 'watchdog'
Publish date: 2024-06-26
I just installed watchdog in the command prompt using pip install watchdog.I uninstalled and reinstalled using python pip -m install watchdog. Neither of these is getting watchdog to work as I keep getting this error: ModuleNotFoundError: No module named 'watchdog'
not sure if me using sublime text 3 is what is affecting this. Please help Here is my code:
from watchdog.observers import observer from watchdog.events import FileSystemEvenHandler import os import json import time
41 Answer
This is a duplicate issue. In summary, 1. It may be a python version inconsistency: * If you use python command, execute this command:
python -m pip install watchdog
- If you use python3 command, execute this command:
python3 -m pip install watchdog
- If all didn't solved problem, reinstall module.
python -m pip install watchdog python -m pip uninstall watchdog
or
python3 -m pip install watchdog python3 -m pip uninstall watchdog
installing module with python -m pip install
is preferred to pip install
.
ncG1vNJzZmirpJawrLvVnqmfpJ%2Bse6S7zGiorp2jqbawutJobWlvY2WAeX%2BOpqadrZyau7DAxaisp5yVp7%2Bwvoynpmaln5nCrbGMp5imnZRixKLAwqGbqJ8%3D