Celery - No module named five

Last version of vine is 5.0.0 and fresh push was in 06.09.2020 (yesterday) :), and this version do not have any five.py file. So downgrade vine version to.

vine==1.3.0

works for me

UPDATE: by the answer Sarang, amqp and celery now requires vine>=5.0.0


You need to create a celery app according to new celery setup. Create a file celery.py in your project folder with settings.

from __future__ import absolute_import

import os
import sys

from celery import Celery


sfile = 'mysettings_file' # override it
os.environ.setdefault('DJANGO_SETTINGS_MODULE', sfile)


from django.conf import settings

project_name = 'referral' # override it

app = Celery(project_name)
app.config_from_object('django.conf:settings')
app.autodiscover_tasks(lambda : settings.INSTALLED_APPS)

In your app/tasks.py, add your task

from referral import celery_app # substitute your project folder

class MyTask(celery_app.Task):

     pass

Then, use this app to register your tasks. Infact, you don't need djcelery if you want to use celery with django, unless you are using it as database backend.


Some suggestions found in internet were:

  • Reinstall both (because of a celery and django-celery version mismatch)

  • Upgrade celery

What worked for me was to upgrade kombu:

pip install kombu -U

NOTE: after updating to celery 3.1, django is supported out of the box.