I have a directory of scripts and folders. I have made separate scripts for organization purposes. The directory consists of PARENTFOLDER\modules\inherited\classes.py I have an init.py file in both modules and inherited because of dependencies in other scripts. I have another script called sequences.py in modules that has from inherited import classes
. It's imported separately from a script called main.py in PARENTFOLDER. The problem is, when I run the script from main.py, it throws the error ModuleNotFoundError: No module named 'inherited'
. It doesn't highlight 'inherited' in the syntax either. I don't know why it isn't recognising inherited as a module.
Currently, this is what the directory looks like:
.
├── assets
├── modules
│ ├── __pycache__
│ ├── inherited
│ │ ├── __init__.py
│ │ └── classes.py
│ ├── __init__.py
│ └── sequences.py
└── main.py