-
Notifications
You must be signed in to change notification settings - Fork 319
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
[BUG] cannot import name '_imaging' from 'PIL' ? #221
Comments
does anything from #154 help? |
thanks for the pointer! Changing the runtime to Python 3.8 worked, as suggested here Neither 3.7 nor 3.9 worked, though, so there does still seem to be an issue out there, but it's no longer blocking me. Fwiw, here's what the layer looks like installed on my function – I didn't think to try another runtime until reading the other thread. Appreciate it! |
the layers with |
thanks for the clarification. at the risk of asking another newb question... is there a reason many packages available in 3.8 are not available in 3.9? I notice that Pillow, for example, is not available in 3.9. thanks again! |
and one more possibly dumb question: is there a reason that common ML packages are not included in this project? I'm thinking about things like...
I guess one possible reason is that, since I need all of these for what I'm building, I would not be able to use all of them, as I'd hit the max layers limit of 5. any other reason? Appreciate it! |
No such thing as dumb questions -- only dumb answers :) But generally the AI/ML packages are too large to fit into layers. Layers have a limit of 250MB uncompressed, and sometimes these layers can easily exceed that. |
understood – thank you! |
Experienced same issue, |
I've also been having the same issue and it doesn't seem to be fixed by changing runtime versions or adding a layer based on these ARNs. For context, I uploaded a virtual environment zip file that includes my code with imported modules, and it seems that one of these imported modules rely on Pillow. |
@talicopanda I was having the same issue until I recreated my lambda function to use runtime of |
I see |
Hi, I'm using Thanks for your great work! |
Hello I have checked your problems carefully>
|
I have tried same arn but still having the issue can you help me to fix this. |
@dnyaneshbqt my solution was:
hope this helps |
Hello, just discovered this project and excited about it – so I apologize if this is a rookie mistake somehow, but I'm trying to use the Pillow layer and getting this error. The layer attached to the Lambda function without any trouble, and I'm stilling trying to run
from PIL import Image
when I'm seeing this errorResponse
{
"errorMessage": "Unable to import module 'lambda_function': cannot import name '_imaging' from 'PIL' (/opt/python/PIL/init.py)",
"errorType": "Runtime.ImportModuleError",
"stackTrace": []
}
Describe the bug
can't load the Pillow library despite adding layer to Lambda function
Layer Version ARN:
I tried two, got the same result from each
Framework:
Console
Additional context
Appreciate your work on this!
The text was updated successfully, but these errors were encountered: