python wand.image is not recognized

人盡茶涼 提交于 2019-11-30 08:36:34
emcconville

ImageMagick Version 7 is a very recent major release. It'll take some time for the community behind (and other bindings) to update core libraries.

For now, you'll have to install the last release of Version 6 (ImageMagick-6.9.8-9-Q16-x64-dll.exe) from http://www.imagemagick.org/download/binaries/

Forbidden Overseer

For those on mac and using homebrew, it seems like Wand doesn't support imagemagick 7 yet as mentioned in other answers.

There's a new brew formula for Imagemagick 6 which can be used to install the older version in the meanwhile:

brew install imagemagick@6

Create a symlink to this newly installed dylib file as mentioned in other answer to get things working.

ln -s /usr/local/Cellar/imagemagick@6/<your specific 6 version>/lib/libMagickWand-6.Q16.dylib /usr/local/lib/libMagickWand.dylib

Tested on Sierra and seems to be working fine.

For me on my Mac I had to (found Wand looks for MAGICK_HOME in Wand source):

export MAGICK_HOME="/usr/local/Cellar/imagemagick@6/6.9.9-31"

That was after installing version 6 of imagemagick. I took a look at the Python source for Wand that was installed after I ran pip3 install Wand. The scripts were looking for imagemagick 6 (I attempted to add 7 into the list of versions it looks for, but got a "wrong version" error).

brew tap homebrew/versions
brew install imagemagick@6

Now, imagemagick version 6 is installed and Wand looks in $MAGICK_HOME for the libraries.

I have found a solution. The problem is:

Wand try to find a file like that: libMagickWand.dylib in /usr/local/lib/

But if you install ImageMagick with Homebrew, the file generated is libMagickWand-6.Q16.dylib And Wand never find it.

So, you have 2 solutions:

  1. Create a symbol link from libMagickWand-7.Q16.dylib to libMagickWand.dylib
  2. You can install by MacPorts or from binaries testing that they create the file.

I have installed the ImageMagick for The Capitan from: http://cactuslab.com/assets/installers/ImageMagick-6.9.1-0.pkg.zip and I declare:

export MAGICK_HOME=/opt/ImageMagick

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!