I wanted to install the Python ImageMagick API wand and followed this site:
http://docs.wand-py.org/en/latest/guide/install.html#install-imagemagick-on-windows
However, when running a very simple test:
from wand.image import Image
I get the following output:
Traceback (most recent call last):
File "F:PATHTOPython34libsite-packageswandapi.py", line 137, in
libraries = load_library()
File "F:PATHTOPython34libsite-packageswandapi.py", line 107, in load_library
raise IOError('cannot find library; tried paths: ' + repr(tried_paths))
OSError: cannot find library; tried paths: ['F:PATHTOImageMagick-6.8.9-Q16CORE_RL_wand_.dll', 'F:PATHTOImageMagick-6.8.9-Q16CORE_RL_wand_HDRI.dll', 'F:PATHTOImageMagick-6.8.9-Q16CORE_RL_wand_-Q16.dll', 'F:PATHTOImageMagick-6.8.9-Q16CORE_RL_wand_-Q16HDRI.dll', 'F:PATHTOImageMagick-6.8.9-Q16CORE_RL_wand_-Q8.dll', 'F:PATHTOImageMagick-6.8.9-Q16CORE_RL_wand_-Q8HDRI.dll', 'F:PATHTOImageMagick-6.8.9-Q16CORE_RL_wand_-6.Q16.dll', 'F:PATHTOImageMagick-6.8.9-Q16CORE_RL_wand_-6.Q16HDRI.dll']
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:PATHTOPythonest.py", line 1, in
import wand.image
File "F:PATHTOPython34libsite-packageswandimage.py", line 20, in
from .api import MagickPixelPacket, libc, libmagick, library
File "F:PATHTOPython34libsite-packageswandapi.py", line 161, in
'Try to install:
' + 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
The is though, that the files that were tried to be found (e.g. CORE_RL_wand_.dll) are in the very place that they were not found in.
So it seems I set the MAGICK_HOME env. variable correctly.
However (what seems to be displayed incorrectly) the paths to the wand api and to my Python installation are displayed with a single backslash in my commandline, while the paths to the ImageMagick folder are displayed with two of them.
I don't understand why this is the case (the env. variable uses single backslashes as in the linked site) and I don't know whether this is the problem or even related to it.
See Question&Answers more detail:
os