Closed merc1er closed 3 years ago
I'm having the same issue in us-west-2
It looks like Pillow no longer supports _imaging. See the bottom warning https://pillow.readthedocs.io/en/4.2.x/installation.html "Pillow >= 2.1.0 no longer supports “import _imaging”. Please use “from PIL.Image import core as _imaging” instead."
Thanks @DylanAlbertazzi , does that mean there's nothing wrong with the layer?
@keithrozario yep. The layer still works fine 🙂 (on 3.7 in us-west-2)
Side question... Do you know if layers work with lambda function running on greengrass for IoT devices?
I'm guessing you can't because I can't get them to work and don't see any documentation mentioning anything about it.
It looks like Pillow no longer supports _imaging
I am not importing _imaging @DylanAlbertazzi
It's not working with me with a very similar setup. There is not much error context as well. Is there a need to set the PATH variable manually?
if anyone else sees this issue, this was my problem: my lambda runtime was python 3.9, but the max runtime for this klayer is 3.8. switching to 3.8 resolved everything
if anyone else sees this issue, this was my problem: my lambda runtime was python 3.9, but the max runtime for this klayer is 3.8. switching to 3.8 resolved everything
I can agree & use the pillow layer from here: https://github.com/keithrozario/Klayers/tree/master/deployments/python3.8
Can someone please confirm if changing the python runtime to 3.8 still works? cause I did that but I'm still getting the same error.
Can someone please confirm if changing the python runtime to 3.8 still works? cause I did that but I'm still getting the same error.
same, not sure what to do
@kxngdavid @jasonrdunne Did you got to resolve it?
This medium post helped me resolve it. I had to change the python runtime to 3.8 (both on lambda and the layer). And then add the layer from the ARN, there's a list metioned on the medium post.
Thanks Jason!
Really appreciate!
On Sun, 21 Jan 2024 at 11:38 PM, Adorp94 @.***> wrote:
This medium post https://derekurizar.medium.com/aws-lambda-python-pil-cannot-import-name-imaging-11b2377d31c4 helped me resolve it. I had to change the python runtime to 3.8 (both on lambda and the layer). And then add the layer from the ARN, there's a list metioned on the medium post.
— Reply to this email directly, view it on GitHub https://github.com/keithrozario/Klayers/issues/154#issuecomment-1902805332, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKOLVYFVS3OHAHUQLSQJQ5DYPWRG7AVCNFSM43O66ZNKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOJQGI4DANJTGMZA . You are receiving this because you were mentioned.Message ID: @.***>
if anyone else sees this issue, this was my problem: my lambda runtime was python 3.9, but the max runtime for this klayer is 3.8. switching to 3.8 resolved everything
AWS will block python3.8 from function create/update soon. So, I'm using python3.9. The layer from the repo working well (This ARN arn:aws:lambda:ap-southeast-2:770693421928:layer:Klayers-p39-pillow:1
) But when I build the layer myself it throws the same message. Anyone has any idea?
(I did pip install pillow in the linux env via docker, All other packages work fine except for pillow)
arn:aws:lambda:us-east-1:770693421928:layer:Klayers-python38Pillow:5
does not work for me for Python3.8
Describe the bug
I am getting the following error when importing anything from
PIL
using the Pillow ARN.Layer Version ARN:
Pillow 8.2.0 in
ap-southeast-1
for Python 3.8.arn:aws:lambda:ap-southeast-1:770693421928:layer:Klayers-python38-Pillow:10
Framework:
Just console.
Additional context
Here is my code:
Same thing when I do:
I am using the
boto3
layer, and this one is working fine when I import it.