I have a weird problem, I successful installed celery, but I can’t import its modules:
>>> 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
this error occurs on celery 2.6.0a3 (from github) or 2.5.3 (from pypi) and django-celery 2.5.5. Tried re-installing several times, and even tried in Jython and I got the same error.
I have no clue what it is, can anyone help me out?
well cloned the project (celery) from github, and a
python setup.py installresolved. Weird that it couldn’t import its modules when installed via pip in my machine (even when /Library/Python/2.7/site-packages/celery/decorators.py task was there).Hope it helps someone.