ImportError: no module named observers after the set watchdog

I try to run the official watchdog example after installing the module watchdogusing pip: pip install watchdogand I get an error:

from watchdog.observers import Observer
ImportError: No module named observers

Can anyone help me out?

+5
source share
1 answer

I understood the cause of the ImportError problem. My module name was the same as the module I was trying to import. Renaming my module to something other than a watchdog or observers resolved this problem. Thank you all for your help!

+11
source

All Articles