Python wand.image not recognized

I installed Imagemagic (both 32 and 64 bit versions were tried) and then used pip to install the wand, I also installed Magick_Home env. variable to imagemagic address but when i started

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "c:\Anaconda2\lib\site-packages\wand\image.py", line 20, in <module> from .api import MagickPixelPacket, libc, libmagick, library File "c:\Anaconda2\lib\site-packages\wand\api.py", line 205, 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#install-imagemagick-on-windows

+6
source share
4 answers

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

Now you will need to install the latest version 6 ( ImageMagick-6.9.8-9-Q16-x64-dll.exe ) from http://www.imagemagick.org/download/binaries/

+15
source

For those on a Mac and using homebrew, it seems like Wand does not support imagemagick 7, but as mentioned in other answers.

There's a new brew formula for Imagemagick 6 that you can use to install an older version:

 brew install imagemagick@6 

Create a symlink to this newly installed dylib file as indicated in another answer to make things work.

 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.

+20
source

For me on my Mac, I should have (found that Wand is looking for MAGICK_HOME in the Wand source):

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

This was after installing version 6 of imagemagick. I took a look at the Python source for Wand, which was installed after I launched pip3 install Wand . The scripts searched for imagemagick 6 (I tried to add 7 to the list of versions that it was looking for, but received a "wrong version" error).

 brew tap homebrew/versions brew install imagemagick@6 

Now, imagemagick version 6 is installed, and Wand is looking at $MAGICK_HOME for libraries.

0
source

I have found a solution. The problem is this:

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

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

So you have 2 solutions:

  • Create a symbol link from libMagickWand-7.Q16.dylib to libMagickWand.dylib
  • You can install MacPorts or from the binary files that they create.

I installed 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

-one
source

All Articles