-
Notifications
You must be signed in to change notification settings - Fork 238
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
No module named PIL error when using Skimage_numpy package #5
Comments
Could I do anything to help debug? |
@stasov I have combination of Pillow and OpenCV https://github.com/ryfeus/lambda-packs/tree/master/Opencv_pil/source . You can try and add Pillow libs from there to skimage package - it may work. I will look more into it in future. |
I tried to copy the Pillow libs but then got some errors about others missing libraries such as scipy, etc. I repeated the process of adding the required the missing libraries but quickly went over the 50MB limit for the Lambda package. Cheerrs |
@stasov @MattFerraro solved the issue. New pack is here: Now there is skimage, scipy, PIL and numpy inside this pack. Testing code is the following:
Let me know if it works. |
Excellent, thank you @ryfeus! I confirmed that with the new pack, the example code you cited runs correctly. However, lots of other imports still break:
When run as a lambda, the error produced looks like this:
|
Actually, there may be a way to do this without If we look at the current master of Maybe, rebuilding with recent sources is all that is necessary to fix this? The change that is relevant seems to come from April 6, 2017. |
@MattFerraro new version of skimage weights a lot more than old one so I just changed _geometry.py file: This code works on my AWS Lambda:
P.S. There is hard limit of 50 mb on lambda archive enforced by AWS (regardless S3). That's why it is usually the issue to combine libs like: |
@MattFerraro thank you for the input on the issue. Let me know if I can close it. |
This works for me now, ready to close! |
When I replace the service.py with the following code and try to test skimage with a simple imread,
Lambda returns:
Unable to import module 'service': No module named PIL
Are there any working code examples with skimage and the package together?
Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: