Say, we have structure
user/
-- app/
---- main.py
---- some_dependency/
---- ...
In main.py we use dependencies from some_dependency.
The program will do fine if we run it with python3 main.py from /app. But if will fail to run if i try python3 app/main.py from /user, due to ModuleNotFoundError for a module from some_dependency/.
Thats understandable, cause python is currently running "from" /user, and can't "find" a module some_dependency there.
I need a way to tell python, that it should run from defined path, say, /user/app.
p.s. I know there is a way to configure something related to PYTHONPATH, but i can't find out what exactly should I do.
p.p.s. Configuring a bash script to cd to desired directory is not what i want.