I have a module called my_module.py
which is under the directory test/my_modules/my_module.py
.
When I am trying to import that module in a different module using:
from test.my_modules.my_module import something
everything seems to be OK when running the code from PyCharm but when running the code outside PyCharm I get the following error:
ModuleNotFoundError: No module named 'test'
PS: Using Python 3.6 so __init__.py
shouldn't be required in every module.