I installed ImageMagick-6.9.9-Q8
, set the Path to "C:\Program Files\ImageMagick-6.9.9-Q8"
and wanted to run the following code:
from wand.image import Image as wi
import io
pdf = wi(filename = "sample2.pdf", resolution = 300)
and here I instantly get this error:
---------------------------------------------------------------------------
DelegateError Traceback (most recent call last)
<ipython-input-6-3e32bc349c64> in <module>()
4
5 # reading the pdf file
----> 6 pdf = wi(filename = "sample2.pdf", resolution = 300)
7 # and converting it to jpeg
8 pdfImage = pdf.convert('jpeg')
~\Anaconda3\lib\site-packages\wand\image.py in __init__(self, image, blob, file, filename, format, width, height, depth, background, resolution)
2742 self.read(blob=blob, resolution=resolution)
2743 elif filename is not None:
-> 2744 self.read(filename=filename, resolution=resolution)
2745 # clear the wand format, otherwise any subsequent call to
2746 # MagickGetImageBlob will silently change the image to this
~\Anaconda3\lib\site-packages\wand\image.py in read(self, file, filename, blob, resolution)
2820 r = library.MagickReadImage(self.wand, filename)
2821 if not r:
-> 2822 self.raise_exception()
2823
2824 def close(self):
~\Anaconda3\lib\site-packages\wand\resource.py in raise_exception(self, stacklevel)
220 warnings.warn(e, stacklevel=stacklevel + 1)
221 elif isinstance(e, Exception):
--> 222 raise e
223
224 def __enter__(self):
DelegateError: PDFDelegateFailed `The system cannot find the file specified.
' @ error/pdf.c/ReadPDFImage/809
In general I have many issues with Anaconda lateley as it is almost impossible to install any packages. Hope someone could help me with this issue.
Thanks!