1. 启动celery -A app worker --loglevel=info 报错ModuleNotFoundError: No module named ‘tkinter’
代码语言:javascript复制安装依赖:
sudo apt-get install tcl-dev tk-dev python3-tk
[实际未安装tk-dev也解决了问题]
2. root账号启动celery 报:
If you really want to continue then you have to set the C_FORCE_ROOT environment variable
代码语言:javascript复制1.__init__.py 文件添加:
from celery import Celery, platforms
platforms.C_FORCE_ROOT = True
2.或bash终端直接声明环境变量:
export C_FORCE_ROOT="true"