python - start flask server @ startup with supervisor: FATAL Exited too quickly -
i trying start flaskserver @ startup of supervisor. error message:
python_auutostart fatal exited (process log may have details)
this entry in logfile:
traceback (most recent call last): file "run.py", line 2, in <module> app import app file "/home/flaskserver/app/__init__.py", line 1, in <module> flask import flask importerror: no module named flask
this .conf:
[program:python_auutostart] user=nobody command = python run.py directory = /home/flaskserver/ autostart = true autorestart = true stderr_logfile=/etc/supervisor/long.err.log stdout_logfile=/etc/supervisor/long.out.log
i can start flaskserver without problems if run ./run.py don´t run supervisor. don´t see why importerror posted. maybe some1 can point me probleme here.
the python use default system python (you can check wich which python
should display /usr/bin/python
or wherever system python is). not have access (by default) libraries installed in virtual environment. instead should use python specific virtualenv. can explicitly calling python should located in /path/to/virtualenv/env/bin/python
. can check activating virtualenv , which python
should output path python of virtualenv.
Comments
Post a Comment