Search code examples
djangocelery

Celery + Django - ModuleNotFoundError: No module named 'celery.backends.amqp'


I have no clue why I am getting this error. My ´requirements.txt´ file includes:

amqp==5.1.1
celery==5.2.7

I have followed the standard configurations here: Any ideas what could be wrong?


Solution

  • As of version 5.0, the amqp backend has been removed from Celery core. You can either replace it with a third party package such as https://pypi.org/project/celery-amqp-backend/ or use rpc://.

    It looks like there is a bug in the original 5.0 release: https://github.com/celery/celery/issues/6384

    But it is fixed with https://github.com/celery/celery/pull/7805

    I'm not sure if this has made it to pypi, though.

    After some more research, it looks like this fix is slated for 5.3 to be released in May: https://github.com/celery/celery/milestone/36