我看不到你在主管配置文件中设置环境:
[program:gunicorn]environment=PYTHonPATH=/usr/local/bin:/usr/local/lib/projectcommand=/usr/local/bin/gunicorn my_app:app -c /path/to/.gu_setup...
如果那不起作用,请尝试以调试模式启动gunicorn:
command=/usr/local/bin/gunicorn --debug --log-level debug my_app:app -c /path/to/.gu_setup
或直接将路径传递至gunicorn:
command=/usr/local/bin/gunicorn --pythonpath /usr/local/bin,/usr/local/lib/project my_app:app -c /path/to/.gu_setup
编辑: gunicorn的–
pythonpath坏了,你只能传递一个目录:
command=/usr/local/bin/gunicorn --pythonpath /usr/local/lib/project my_app:app -c /path/to/.gu_setup



