1

I am trying to import PIL on AWS.

I installed PIL using the below command.

pip3 install Pillow -t Desktop/myfolder

then zipped inside library and a lambda_function.py

It looks on aws console like this

EDIT : New snapshot

But I'm getting the below error.

ule 'lambda_function': cannot import name '_imaging'

3
  • First of all, why an image at all? Second, why an image that has a different error than the one you're asking about? Commented Jun 7, 2018 at 9:49
  • @OferSadan that was by mistake . I updated question Commented Jun 7, 2018 at 9:56
  • this question already has an answer here stackoverflow.com/questions/50734416/… Commented Jun 7, 2018 at 10:39

1 Answer 1

-1

Python will not import names with a leading underscore unless the module defines an __all __ list that overrides this behavior. Leading underscores impact how names get imported from modules.

Refer here for detailed explanation.

Just do this instead

import PIL
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.