Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

readme.md

ModuleNotFoundError: No module named 'my_utils'

Occurs when trying to import a local module that Python cannot find.

Reproduce

from my_utils import greet

greet()

Error Message

ModuleNotFoundError: No module named 'my_utils'

Fix

# Make sure my_utils.py exists in the same directory

from my_utils import greet

greet()

Reflection

I thought the file was there, but it turned out Python couldn't see it. In my case, the file was either missing or not in the same folder as the script.