简体   繁体   中英

Celery/SQS error “No module named sqs”

I am unable to configure Celery to use SQS. I followed the instructions on this link: http://docs.celeryproject.org/en/latest/getting-started/brokers/sqs.html

Here is the stack trace.

[2018-02-21 12:27:25,073: CRITICAL/MainProcess] Unrecoverable error: ModuleNotFoundError("No module named 'sqs'",) 12:27:25 worker.1 | Traceback (most recent call last): 12:27:25 worker.1 | File "/Users/logan/.virtualenvs/dolittle/lib/python3.6/site-packages/kombu/utils/objects.py", line 42, in get 12:27:25 worker.1 | return obj. dict [self. name ] 12:27:25 worker.1 | KeyError: 'backend'

I'm using Python 3.6.

Dependencies:

boto==2.46.1
celery==4.0.2

Am I missing something?

It's using SQS as a result backend as well. You can set CELERY_RESULT_BACKEND = None , for example.

You need to install celery[sqs] as per the new documentation:

https://docs.celeryproject.org/en/stable/getting-started/backends-and-brokers/sqs.html

When installing via PIP, if you have the following issue:

FileNotFoundError: [Errno 2] No such file or directory: 'curl-config'

Install the libcurl devel packages:

Debian based :

sudo apt install libcurl4-openssl-dev libssl-dev

Centos/Fedora :

dnf install libcurl-devel

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM