I am trying to import Navigator class in renameFrame.py from navigator.py but, its giving me error ModuleNotFoundError: No module named ‘navigator’ In the below image you can see the directory structure.
Here is image of Navigator.py file
Thank you so much for your help 🙏🏻.
>Solution :
Python3 dropped support for implicit relative imports. You need to make the import absolute or explicitly relative by adding a leading .:
from .navigator import Navigator
Since you’re running rename.py, the Bunch File Rename directory will be in sys.path, but Bunch File Rename/packages is not. Due to this, navigator.py is not on any of the paths where python searches for packages.
Alternatively, you can do:
from packages.navigator import Navigator

