$ sudo supervisorctl status
guni:gunicorn FATAL Exited too quickly (process log may have details)
简而言之,进程日志详细信息:django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
Did you install mysqlclient?
import MySQLdb as Database
ModuleNotFoundError: No module named 'MySQLdb'
The above exception was the direct cause of the following exception:
所有软件包都安装了最新版本,但在运行 sudo supervisorctl status
后仍然出现上述错误输出 gumi:gunicorn: ERROR (spawn error)
知道我缺少什么吗?
最佳答案
根据this answer使用 pip 安装 pymysql 可能会有所帮助:
pip install pymysql
然后你可以编辑初始化 项目源目录的 .py 文件(与 settings.py 相同),其中包含以下几行:import pymysql
pymysql.install_as_MySQLdb()
关于mysql - sudo supervisorctl 状态 : gumi gunicorn ERROR (spawn error),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69990851/