-
Notifications
You must be signed in to change notification settings - Fork 26
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
Unable to import module 'pdf2image_demo': cannot import name '_imaging' #8
Comments
IIRC it's an issue with Pillow, when the package is installed for pdf2image if the environment already has Pillow installed, the Pillow dependency sometimes end up in a broken state. I'll do some tests on my side. |
I was able to reproduce the issue on master with a clean OS. |
Found the issue (and I am a little disappointed that I didn't think about it sooner). Pillow is a compiled cython module which means that it depends on having matching python versions. Archlinux (and you OS I assume) now ship with 3.7 as default which his not compatible with the 3.6 interpreter used by AWS lambda. I don't have a fix for now, I simply installed python 3.6 and built the package with that. Maybe the whole thing could be built in the docker container. |
I was using your master version without any changes. It means that it was compiled/build using ubuntu:18.04 docker image. |
The issue is unrelated to docker, you simply have to use python 3.6 when running the script. |
Hi Belval, Thanks for this. It will be really helpful for many of us. But Is there a chance you can try the step by step guide to use docker and run this service on AWS Lambda. Since, many of us are not much experienced with Docker, having those steps would be really really helpful. Thanks in advance! |
Sure I can try to write a small how-to. I'll see to it this week. |
Awesome, will look forward to it |
Belval bro cmon... We having a bit of trouble here. I can pay in NFTs |
Hi,
After deploying it to the AWS Lambda using your sh script I got the error:
What could cause it?
The text was updated successfully, but these errors were encountered: