我有一个奇怪的问题,我成功安装了 celery,但我无法导入它的模块:
>>> import celery # OK
>>> import djcelery
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/django_celery-2.5.5-py2.7.egg/djcelery/__init__.py", line 25, in <module>
from celery import current_app as celery # noqa
ImportError: cannot import name current_app
>>> from celery.decorators import task
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named decorators
此错误发生在 celery 2.6.0a3(来自 github)或 2.5.3(来自 pypi)和 django-celery 2.5.5 上。尝试重新安装几次,甚至在 Jython 中尝试过,我得到了同样的错误。
我不知道它是什么,有人可以帮助我吗?