python redis celery启动失败

celery -A yourappname worker --loglevel=info
时候报错

File "/usr/local/lib/python3.7/site-packages/celery/backends/redis.py", line 22
from . import async, base
^
SyntaxError: invalid syntax

 

 

python(3.7)syntax成了关键字 redis 3.*不支持,需要升级redis包至4.*

升级命令如下

pip install --upgrade https://github.com/celery/celery/tarball/master

外网有时候下载安装失败,多试几次

 

posted @ 2019-01-31 15:17  mingtao  阅读(1422)  评论(1编辑  收藏  举报