Tag Archives: ModuleNotFoundError: No module named ‘utils’

ModuleNotFoundError: No module named ‘utils’ [How to Solve]

The user-defined model inherits a basemodel defined in utils. When migrating files, an error is reported

ModuleNotFoundError: No module named 'utils'

Check that there is a utils file, so try to find out if there is a problem with the import path

In setting

# Query the package path
print(sys.path)

# Add the package path
sys.path.insert(0,'path to be added')
print(sys.path)

Then try to run the problem solving again