I am trying to follow the example in the "First Steps with Celery" document. I have installed Celery using pip.
I created a file called tasks.py in ~/python/celery, and it contains the following:
from celery import Celery celery = Celery('tasks', broker='amqp://guest@localhost//') @celery.task def add(x, y): return x + y
I started a worker using celery -A tasks worker --loglevel=info while in the ~/python/celery directory, and it seems to be running.
In a separate Terminal window, I launched Python and ran the following:
from tasks import add add.delay(4, 4)
I get the error: File "/Library/Python/2.7/site-packages/celery/utils/timeutils.py", line 17, in from dateutil import tz ImportError: No module named dateutil
How do I install dateutils? It is listed as an installed module when I type "pip freeze"
Thanks!