-
-
Notifications
You must be signed in to change notification settings - Fork 152
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
Cairosvg not working when deployed to AWS Lambda python 3.8 #384
Comments
Hello, Did you install the cairo library on your Amazon Linux 2? You can install it with the package manager of the distribution. |
Yes, Amazon linux 2 is part of AWS lambda. I am packaging everything and deploying it using serverless framework. |
Using the amazonlinux:2 docker image and the following steps, I can’t reproduce the issue:
Can you reproduce your issue with this Docker image? |
It's working in the docker image because it's able to reference the dependencies from the Linux OS that comes from running
On the lambda side, you need to put these somewhere your code can see the shared libraries. I didn't have luck setting the Good luck! |
Thanks for the reply @goodpaul. I will try with lambda layer. |
Cairosvg not working when deployed to AWS Lambda python 3.8 (Amazon linux 2). Working with python 3.7 (Amazon linux 1).
Python: OSError: cannot load library libcairo.so.2
cannot load library ‘libcairo.so’: libcairo.so: cannot open shared object file: No such file or directory
cannot load library ‘libcairo.2.dylib’: libcairo.2.dylib: cannot open shared object file: No such file or directory
cannot load library ‘libcairo-2.dll’: libcairo-2.dll: cannot open shared object file: No such file or directory
Using with reportlab.
The text was updated successfully, but these errors were encountered: