uwsgi启动提示找不到django
来源:17-7 uwsgi和nginx配置
LYNG2488051
2021-04-11
File “./ops/wsgi.py”, line 12, in
from django.core.wsgi import get_wsgi_application
ModuleNotFoundError: No module named ‘django’
unable to load app 0 (mountpoint=’’) (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
uWSGI running as root, you can use --uid/–gid/–chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
spawned uWSGI master process (pid: 11587)
spawned uWSGI worker 1 (pid: 11588, cores: 1)
goodbye to uWSGI.
(venv) [root@poes ops]#
在虚拟环境下启动的,提示找不到django,命令可以直接启动没问题,通过配置文件就报这个错,配置文件里也加了虚拟环境路径,是什么原因?
3回答
-
bobby
2021-04-14
这个缺东是你的虚拟环境目录吗?你有没有cd进去过 看看是否是正确的路径?
022021-04-14 -
LYNG2488051
提问者
2021-04-12
配置文件00 -
bobby
2021-04-12
你的uwsgi的配置截图我看看 是否在uwsgi中设置了进入虚拟环境?
012021-04-12
相似问题