Good morning,
After a lot of attemps running
from wand.image import Image
I get the following error:
Traceback (most recent call last):
File "C:\Users\XXXXX\PycharmProjects\PDF_convert\venv\lib\site-packages\wand\api.py", line 180, in <module>
libraries = load_library()
File "C:\Users\XXXXX\PycharmProjects\PDF_convert\venv\lib\site-packages\wand\api.py", line 135, in load_library
raise IOError('cannot find library; tried paths: ' + repr(tried_paths))
OSError: cannot find library; tried paths: ['C:\\Program Files\\ImageMagick-6.9.9-Q8\\CORE_RL_wand_.dll', 'C:\\Program Files\\ImageMagick-6.9.9-Q8\\libMagickWand.dll', 'C:\\Program Files\\ImageMagick-6.9.9-Q8\\CORE_RL_wand_.dll', 'C:\\Program Files\\ImageMagick-6.9.9-Q8\\CORE_RL_wand_HDRI.dll', 'C:\\Program Files\\ImageMagick-6.9.9-Q8\\libMagickWandHDRI.dll', 'C:\\Program Files\\ImageMagick-6.9.9-Q8\\CORE_RL_wand_HDRI-2.dll', 'C:\\Program Files\\ImageMagick-6.9.9-Q8\\libMagickWandHDRI-2.dll', 'C:\\Program Files\\ImageMagick-6.9.9-Q8\\CORE_RL_wand_-6.dll', 'C:\\Program Files\\ImageMagick-6.9.9-Q8\\libMagickWand-6.dll', 'C:\\Program Files\\ImageMagick-6.9.9-Q8\\CORE_RL_wand_-6HDRI.dll', 'C:\\Program Files\\ImageMagick-6.9.9-Q8\\libMagickWand-6HDRI.dll', 'C:\\Program Files\\ImageMagick-6.9.9-Q8\\CORE_RL_wand_-6HDRI-2.dll', 'C:\\Program Files\\ImageMagick-6.9.9-Q8\\libMagickWand-6HDRI-2.dll', 'C:\\Program Files\\ImageMagick-6.9.9-Q8\\CORE_RL_wand_-Q16.dll', 'C:\\Program Files\\ImageMagick-6.9.9-Q8\\libMagickWand-Q16.dll', 'C:\\Program Files\\ImageMagick-6.9.9-Q8\\CORE_RL_wand_-Q16HDRI.dll', 'C:\\Program Files\\ImageMagick-6.9.9-Q8\\libMagickWand-Q16HDRI.dll', 'C:\\Program Files\\ImageMagick-6.9.9-Q8\\CORE_RL_wand_-Q16HDRI-2.dll', 'C:\\Program Files\\ImageMagick-6.9.9-Q8\\libMagickWand-Q16HDRI-2.dll', 'C:\\Program Files\\ImageMagick-6.9.9-Q8\\CORE_RL_wand_-Q8.dll', 'C:\\Program Files\\ImageMagick-6.9.9-Q8\\libMagickWand-Q8.dll', 'C:\\Program Files\\ImageMagick-6.9.9-Q8\\CORE_RL_wand_-Q8HDRI.dll', 'C:\\Program Files\\ImageMagick-6.9.9-Q8\\libMagickWand-Q8HDRI.dll', 'C:\\Program Files\\ImageMagick-6.9.9-Q8\\CORE_RL_wand_-Q8HDRI-2.dll', 'C:\\Program Files\\ImageMagick-6.9.9-Q8\\libMagickWand-Q8HDRI-2.dll', 'C:\\Program Files\\ImageMagick-6.9.9-Q8\\CORE_RL_wand_-6.Q16.dll', 'C:\\Program Files\\ImageMagick-6.9.9-Q8\\libMagickWand-6.Q16.dll', 'C:\\Program Files\\ImageMagick-6.9.9-Q8\\CORE_RL_wand_-6.Q16HDRI.dll', 'C:\\Program Files\\ImageMagick-6.9.9-Q8\\libMagickWand-6.Q16HDRI.dll', 'C:\\Program Files\\ImageMagick-6.9.9-Q8\\CORE_RL_wand_-6.Q16HDRI-2.dll', 'C:\\Program Files\\ImageMagick-6.9.9-Q8\\libMagickWand-6.Q16HDRI-2.dll']
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "C:\Program Files\JetBrains\PyCharm Community Edition 2017.3.3\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 20, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\xxxxx\PycharmProjects\PDF_convert\venv\lib\site-packages\wand\image.py", line 20, in <module>
from .api import MagickPixelPacket, libc, libmagick, library
File "C:\Program Files\JetBrains\PyCharm Community Edition 2017.3.3\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 20, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\XXXX\PycharmProjects\PDF_convert\venv\lib\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:
http://docs.wand-py.org/en/latest/guide/install.html#install-imagemagick-on-windows
I have tried everything: 1. Install the most recent binaries ImageMagick-6.9.9-40-Q8-x64-dll (1).exe (checking the required options) 2. Define MAGICK_HOME path as: C:\Program Files\ImageMagick-6.9.9-Q8 3. Restart computer
and still giving me this error.
I'm using windows 10,
Can someone help me with this error? I really need to use this library for scanned ocr pdf.
Thanks in advance!win
Refer to this answer here. I had the same problem but I had a 32bit version of Python so I had to download the x86 version of ImageMagick.