Skip to main content
Python import errors

ImportError: No module named '<module>.py'; '<module>' is not a package

Ian avatar
Written by Ian
Updated over 2 years ago

Instead of

import <modulename>.py

use:

import <modulename>

For more on Python Modules check out Python Documentation on Modules

Did this answer your question?