Importing Ghostscript to Python on Windows 8

I am trying to import ghostscript in Python to convert PDFs to .tiff format.

I am using Python version 2.7.10 on Windows 8.

I have successfully downloaded and installed ghostscript using pip and it appears in the correct location (... \ Anaconda \ Lib \ sitepackages). I have confirmed that other packages located in this directory can be imported into Python.

I am using the command import ghostscript

When I do this, I get the error:

RuntimeError: Cannot find Ghostscript DLL in registry

Tracking indicates that calling the file "ghoscript_init_.py" successfully imports _gsprint as gs.

However, when the import function tries to access "ghostscript_gsprint.py", it throws a RuntimeError where it cannot find the Ghostscript DLL.

Any advice or advice would be greatly appreciated. Thank!

+3


source to share


1 answer


Besides installing ghostscript

python bindings from PyPI using pip install ghostscript

, you also need to install the correct Ghostscript program for your platform, as described in the PyPI page . This page states that version 8.x is required, but I am currently using 9.2 successfully.



Download links here .

0


source







All Articles