Ubuntu18.04_遇见的疑难杂症集

2023-03-07 14:32:44 浏览数 (1)

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"

0 人点赞