Can't access top level python package from sub packages
问题 I have a directory structure like below: chatbot/ __init__.py utils/ __init__.py parser.py nlu/ __init__.py training/ __init__.py module.py I want to access parser.py from module.py . I tried using this line from module.py : from chatbot.utils import parser And I got this error: ModuleNotFoundError: No module named 'chatbot' Any pointers to what I am doing wrong? I am using python3 and trying to run the script as python3 nlu/training/module.py . Thanks in advance! 回答1: I believe the right way