2016-07-26 54 views
2

如果您的django项目名为“app”,是否可以运行celery命令行?如果django项目名称为“app”,Celery命令行错误

Django应用程序结构:

|- app 
| |- __init__.py 
| |- settings.py 
| |- celery.py 
|- manage.py 

__init__.pycelery.py被设置为每文档:http://docs.celeryproject.org/en/master/django/first-steps-with-django.html

我收到以下错误ImportError: No module named celery当我运行celery --app=app.celery:app worker。当我将“应用程序”重命名为其他内容时,此错误不存在,但我宁愿不必这样做。

回答

0

你需要安装芹菜包你的虚拟环境中,如

pip install celery 

安装包后,请检查您的虚拟环境芹菜版本

celery --version 

它显示当前芹菜版本和芹菜--help它如下所示 enter image description here

相关问题