-
Notifications
You must be signed in to change notification settings - Fork 896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No module named 'confluent_kafka.cimpl' AWS Lambda / Python 3.9 #1295
Comments
Hi @temeke, thanks for asking. Have you tried to install confluent_kafka with python 3.9? This is command I used to install confluent_kafka on my local
|
Hi, I get the same issue with
I installed librdkafka using brew on macOS (Monterey 12.3 , Apple M1) |
@talktomeg Update your local librdkafka installation to the latest version (1.8.2) |
Hi @edenhill . It is the latest version.
|
Is that AdminOptions_destroy the only error you get? You could try to specify the directory path to where librdkafka.dylib.1 resides with: |
Hi @edenhill ..Thank you for all the help! The full error log is
However, I noticed that after rebuilding librdkafka from source and rerunning configure + make worked for me. Appreciate the help! Thank you! |
I'm having the same issue that @temeke mentioned originally in this issue. When running in an AWS Lambda using python 3.9 and confluent_kafka version 1.8.2 I get the following error: No module named 'confluent_kafka.cimpl'. Has anyone found a solution to this? |
Hi @Phillip14 , how did you create the lambda function? For example, from a docker image, author from scratch. |
I'm also having the same issue as @Phillip14 and @temeke. However, I am using I created my lambda function code in PyCharm and uploaded to Lambda via .zip file and I uploaded the If I have to use |
I found a solution that worked for me: https://stackoverflow.com/questions/63757476/error-while-using-confluent-kafka-python-library-with-aws-lambda |
@jliunyu I'm authoring from scratch. Upon further review, I think the issue may lie in the way I'm building my lambda layer as the lambda is not able to import other packages as well (not just confluent_kafka). I will continue to debug from that perspective and look into the solution @rbhatti999 posted. Thanks for your responses! |
triaging. marking as enhancement because we should do an AWS Lambda example, like the go client: confluentinc/confluent-kafka-go#823 |
@temeke this resolves the problem, you should create a zip installing your dependencies with a image of a lambda from Docker and then add that to a zip ,then create a layer for your lambda, that works for me perfectly with Python 3.8 Lambda &Confluent |
@says-megz Can you tell how can we build from source in mac |
@edenhill Any idea where the file will be located if we build from source |
No module named 'confluent_kafka.cimpl'
How to reproduce:
Deploy AWS Lambda function with Python 3.9 runtime and try to import:
from confluent_kafka import Producer
When confluent_kafka version 1.8.2 is used it returns an error:
No module named 'confluent_kafka.cimpl'
Works with Python 3.7 and confluent_kafka version 1.7.0.
The text was updated successfully, but these errors were encountered: