Trying to run Wand on AWS Lambda for some simple image manipulation.
So far I've:
- created an instance that's identical to lambda environment
installed imagemagick from source
wget ImageMagick cd ImageMagick-... ./configure --prefix=/home/ec2-user/im --without-x make && make install
set MAGICK_HOME to
/home/ec2-user/im/
pip install wand
but when I try to import wand.image I get:
import wand.image
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ec2-user/cv/local/lib64/python2.7/site-packages/wand/image.py", line 20, in <module>
from .api import MagickPixelPacket, libc, libmagick, library
File "/home/ec2-user/cv/local/lib64/python2.7/site-packages/wand/api.py", line 206, in <module>
'Try to install:\n ' + msg)
ImportError: MagickWand shared library not found.
You probably had not installed ImageMagick library.
Try to install:
http://docs.wand-py.org/en/latest/guide/install.html
It works fine when I do a yum install ImageMagick
, but since I want to bundle it I thought I'd need to include the binary and point the wand installation to it.
Any thoughts?