I have a python project with this directory structure and these files:
/home/project_root
|
|
|
|
|
|
|
The tester script imports from setup / configs.py the link "setup.configs". It works fine on my development machine.
This works on a development computer (Linux). When I transfer this to another (Linux) computer, I install PYTHONPATH with
PYTHONPATH = "/home/project_root"
But when I run tester.py, it cannot find the configs module. And when I run the interactive Python interpreter, sys.path does not include the / home / project _root directory. But / home / project_root appears when I repeat $ PYTHPATH.
What am I doing wrong here?
( .bashrc, PYTHONPATH - Django www-. , apache Django PYTHONPATH, , , .)
.
- , .
- sudo ( Ubuntu ) , .
- script sudo, www-data (b/c , apache Django).
- , script ( ).
. .