Reputation: 489
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
Upvotes: 4
Views: 12798
Reputation: 1
Check your python interpreter version, "ModuleNotFoundError: No module named 'watchdog'" resolved for me after I changed the python interpreter version greater than 3.11. In VS Code, you can change the python interpreter version, by following the path view -> Command Palette -> Python: Select Interpreter -> Choose interpreter version greater than or equal to 3.11.
Upvotes: 0
Reputation: 66
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
python3 -m pip install watchdog
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
.
Upvotes: 3