ImportError: No module named observers after installed watchdog

scythargon picture scythargon · Aug 6, 2012 · Viewed 13.3k times · Source

Im trying to run official watchdog simple example after installing the watchdog module using pip: pip install watchdog, and i get an error:

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

Can someone please help me?

Answer

scythargon picture scythargon · Aug 7, 2012

I figured the cause for the ImportError issue. My module name was the same as the module I was trying to import. Renaming my module to something else other than watchdog or observers resolved this issue. Thanks all for your help!