下面显示我尝试运行我的代码,其中包含未找到MagickWand共享库且未安装imagemagick库的响应。所以我尝试安装,但它显示它已经安装好了吗?有关麻烦拍摄的后续步骤的建议吗?
python /Users/osx/Downloads/pdf_manage/main.py
Traceback (most recent call last):
File "/Users/osx/Downloads/pdf_manage/main.py", line 3, in <module>
from src.pdf_utils import PdfUtils
File "/Users/osx/Downloads/pdf_manage/src/pdf_utils.py", line 5, in <module>
from wand.image import Image as WandImage
File "/usr/local/lib/python2.7/site-packages/wand/image.py", line 20, in <module>
from .api import MagickPixelPacket, libc, libmagick, library
File "/usr/local/lib/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:
brew install freetype imagemagick
osx:~ osx$ brew install imageMagick
Warning: imagemagick 7.0.7-26 is already installed
osx:~ osx$ brew install freetype
Warning: freetype 2.9 is already installed
更新 - 运行以下修复我的问题:
ln -s /usr/local/Cellar/imagemagick@6/6.9.9-38/lib/libMagickWand-6.Q16.dylib /usr/local/lib/libMagickWand.dylib