I bet you have a local file named threading.py
, and it‘s masking the system threading
module.
You can verify this by printing threading.__file__
:
import threading
print threading.__file__
to get the file path of the module that is being imported.
Rename it, or delete it, to fix this.