Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

supervisor 通过虚拟环境中的gunicorn运行程序提示找不到模块

非 root 用户,网站目录是 /home/www/web/

supervisor 配置文件:

[program: weba]
dirctory = /home/www/web/
command = /home/www/web/.env/bin/gunicorn -w 4 'app:create_app()'
autostart = true
autorestart = true
stdout_logfile = /var/log/supervisor/supervisord_web.log
stderr_logfile = /var/log/supervisor/weba_err.log
startsecs = 5

supervisor 启动错误日志显示是找不到app模块:ModuleNotFoundError: No module named 'app'

但是在任何位置 直接输入 :/home/www/web/.env/bin/gunicorn -w 4 'app:create_app()' 是OK的

这是什么情况


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...