What is an 'ImportError' and what are common causes?

Responsive Ad Header

Question

Grade: Education Subject: Support
What is an 'ImportError' and what are common causes?
Asked by:
52 Viewed 52 Answers

Answer (52)

Best Answer
(385)
An 'ImportError' means Python couldn't find or load the module you're trying to import. Common causes include: the module isn't installed (use `pip install module_name`), the module name is misspelled, the module is not in Python's search path (check `sys.path`), or there's a circular import dependency. Verify the module is installed correctly and that the name is spelled correctly.