I have a project with the following structure:
.
└── project
├── assignment01
| ├── __init__.py
| └── old_file.py
|
├── assignment02
| ├── __init__.py
| └── new_file.py
└── __init__.py
I need to use a function that I implemented in the first assignment in the file new_file.py
which I import as follows:
from assignment01 import old_file as assgn1
Currently, I'm programming in PyCharm and the IDE does not show any warnings or problems. It even autocompletes the code above. Nonetheless, when I want to run new_file.py
in the command line it throws the following error:
ModuleNotFoundError: No module named 'assignment01'