ModuleNotFoundError: No module named 'mirage'

Viewed 137
from mirage.fact import Dataconfig
ModuleNotFoundError: No module named 'mirage'

File Structure diagram

I am running the file called Base.py and i am from mirage.fact import Datsconfig

3 Answers

Your folders Mirage and Fact are with capital letters but your import mirage.fact is in lower case.

Try this:

import sys
sys.path.append("..")
from mirage.fact import Dataconfig

Try creating an empty file __init__.py in the folder mirage and an empty file __init__.py in the folder mirage/fact.

Related