Unable to import Celery modules

I have a strange problem, I successfully installed celery, but I can not 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 in celery 2.6.0a3 (from github) or 2.5.3 (from pypi) and django-celery 2.5.5. Tried to reinstall several times and even tried in Jython and I got the same error.

I have no idea what it is, can anyone help me?

+5
source share
2 answers

well cloned a project (celery) from github and resolved python setup.py install. It is strange that he could not import his modules when installing via pip on my computer (even if there was a task / Library / Python / 2.7 / site-packages / celery / decorators.py).

Hope this helps someone.

-1
source

, , .

python (, , libs os "python) python.

virtualenv, virtualenv python, virtualenv script virtualenv python virtualenv .

+4

All Articles