I am trying to use ImageMagick in Python3.7 using Wand binding. I have successfully installed ImageMagick & Wand(pip install, version: 0.5.7) But I'm constantly getting the error that says:
'AttributeError: function 'MagickCompareImagesLayers' not found'
I followed the below steps as mentioned in official Wand Document
(link here)!:
1) Installed ImageMagick Binary from official website (windows, 64bit version)
2) Once installed, added the path to System Variables with name 'MAGICK_HOME'
3) Installed Wand using pip
Config:
-- platform.attribute() - ('64bit', 'WindowsPE');
-- Python3.7.4;
-- Wand==0.5.7;
-- ImageMagick-6.9.10-35-Q8-x64-dll
Running the following command after the above steps:
from wand.image import Image
yields following error:
Traceback (most recent call last):
File "", line 1, in from wand.image import Image
File "c:\users\surya\appdata\local\programs\python\python37\lib\site-packages\wand\image.py", line 18, in from . import assertions
File "c:\users\surya\appdata\local\programs\python\python37\lib\site-packages\wand\assertions.py", line 125, in from .color import Color # noqa: E402
File "c:\users\surya\appdata\local\programs\python\python37\lib\site-packages\wand\color.py", line 10, in from .api import library
File "c:\users\surya\appdata\local\programs\python\python37\lib\site-packages\wand\api.py", line 205, in traceback.format_exc())
ImportError: MagickWand shared library not found or incompatible Original exception was raised in: Traceback (most recent call last): File "c:\users\surya\appdata\local\programs\python\python37\lib\site-packages\wand\api.py", line 196, in magick_image.load(library, IM_VERSION.value) File "c:\users\surya\appdata\local\programs\python\python37\lib\site-packages\wand\cdefs\magick_image.py", line 228, in load lib.MagickCompareImagesLayers.argtypes = [c_void_p, c_int] File "c:\users\surya\appdata\local\programs\python\python37\lib\ctypes__init__.py", line 377, in getattr func = self.getitem(name) File "c:\users\surya\appdata\local\programs\python\python37\lib\ctypes__init__.py", line 382, in getitem func = self._FuncPtr((name_or_ordinal, self)) AttributeError: function 'MagickCompareImagesLayers' not found
Getting the following error:
Traceback (most recent call last):
File "<ipython-input-7-4c9b1a6583e4>", line 1, in <module>
from wand.image import Image
File "c:\users\surya\appdata\local\programs\python\python37\lib\site-packages\wand\image.py", line 18, in <module>
from . import assertions
File "c:\users\surya\appdata\local\programs\python\python37\lib\site-packages\wand\assertions.py", line 125, in <module>
from .color import Color # noqa: E402
File "c:\users\surya\appdata\local\programs\python\python37\lib\site-packages\wand\color.py", line 10, in <module>
from .api import library
File "c:\users\surya\appdata\local\programs\python\python37\lib\site-packages\wand\api.py", line 205, in <module>
traceback.format_exc())
ImportError: MagickWand shared library not found or incompatible
Original exception was raised in:
Traceback (most recent call last):
File "c:\users\surya\appdata\local\programs\python\python37\lib\site-packages\wand\api.py", line 196, in <module>
magick_image.load(library, IM_VERSION.value)
File "c:\users\surya\appdata\local\programs\python\python37\lib\site-packages\wand\cdefs\magick_image.py", line 228, in load
lib.MagickCompareImagesLayers.argtypes = [c_void_p, c_int]
File "c:\users\surya\appdata\local\programs\python\python37\lib\ctypes\__init__.py", line 377, in __getattr__
func = self.__getitem__(name)
File "c:\users\surya\appdata\local\programs\python\python37\lib\ctypes\__init__.py", line 382, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'MagickCompareImagesLayers' not found