嘗試在AWS Lambda上運行魔杖以進行一些簡單的圖像處理。AWS上的Python魔杖和ImageMagick Lambda
到目前爲止,我:
- 創建實例,這是相同的拉姆達環境
從源代碼安裝ImageMagick的
wget ImageMagick cd ImageMagick-... ./configure --prefix=/home/ec2-user/im --without-x make && make install
集MAGICK_HOME到
/home/ec2-user/im/
pip install wand
但是當我嘗試導入wand.image我得到:
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
它當我做了yum install ImageMagick
工作正常,但因爲我想將其捆綁我想我需要包括二進制文件並將魔杖安裝指向它。
有什麼想法?
是你能得到任何解決這個?看起來我會沿着相同的路徑... – RHH
是的,算出來,以及像opencv,keras等一些其他庫。 – daxiangCODE