camelot-dev / camelot

A Python library to extract tabular data from PDFs
https://camelot-py.readthedocs.io
MIT License
2.81k stars 449 forks source link

Ghostscript install through pip not working, .exe install requires admin permission #388

Open radian314 opened 1 year ago

radian314 commented 1 year ago

I cannot use camelot because I need admin privileges to install ghostscript as an .exe on Windows 10, even though I am able to install it through pip and add it to path- camelot doesn't recognise it, though. Is there any way around this?

The error message I'm getting is as follows: "OSError: Ghostscript is not installed. You can install it using the instructions here: https://camelot-py.readthedocs.io/en/master/user/install-deps.html"

dlevine01 commented 1 year ago

@radian314 you can avoid using (and needing to install) Ghostscript by using poppler as an alternative backend for converting pdf to png.

You'll need to install pdftopng, which is available by pip or on conda-forge

then follow this: https://camelot-py.readthedocs.io/en/master/user/advanced.html#use-alternate-image-conversion-backends

(the key is adding the argument backend="poppler")

(I'm not a dev here, but I figured out this workaround to the same problem so want to share)