After installed my django project, I found some files here:
/opt/pkgs/myproject/lib/python2.7/site-packages/myproject-2.3-py2.7.egg/dashboard/management/commands/myjob.py
/opt/pkgs/myproject/lib/python2.7/site-packages/myproject-2.3-py2.7.egg/manage.py
When run python manage.py myjob
or sudo python manage.py validate
, error is
python: can't open file 'manage.py': [Errno 2] No such file or directory
It is ugly to run sudo python /opt/pkgs/myproject/lib/python2.7/site-packages/myproject-2.3-py2.7.egg/manage.py validate
How to fix it? Any useful doc?
UPDATE
sys.path:
['', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PIL']
I failed to add path "/opt/pkgs/myproject/lib/python2.7/site-packages/myproject-2.3-py2.7.egg/manage.py" to sys.path permanently.