camelot icon indicating copy to clipboard operation
camelot copied to clipboard

Ghostscript is not installed,but I have install it by pip

Open zwj971028 opened this issue 4 years ago • 9 comments

hello: I try run

import camelot tables = camelot.read_pdf('WL-YL-05-2021H1-南京书影文化传媒有限公司-不良人.pdf') in python 3.6

but the result is:

OSError: Ghostscript is not installed. You can install it using the instructions here: https://camelot-py.readthedocs.io/en/master/user/install-deps.html

however, but I have install it by pip~~why? thank you very much!!!

zwj971028 avatar Jul 26 '21 12:07 zwj971028

Yeah, it is also given in README: https://github.com/atlanhq/camelot#using-pip

just for installing additional dependency requirements, and it is not integrated with the package because different OS have different installations for GhostScript

Siddhant-K-code avatar Jul 27 '21 06:07 Siddhant-K-code

@Did you solve it? I am struggling with it.

hello: I try run

import camelot tables = camelot.read_pdf('WL-YL-05-2021H1-南京书影文化传媒有限公司-不良人.pdf') in python 3.6

but the result is:

OSError: Ghostscript is not installed. You can install it using the instructions here: https://camelot-py.readthedocs.io/en/master/user/install-deps.html

however, but I have install it by pip~~why? thank you very much!!!

Did you solve it? I am struggling with it.

garzo94 avatar Oct 20 '21 00:10 garzo94

Hi, I had the same issue, and the following solution worked in my case:

1º I checked to see if dependencies were installed correctly, however the output of the find_library function was empty. Using the steps in this link: https://camelot-py.readthedocs.io/en/master/user/install-deps.html#for-ghostscript Windows using python IDLE: import ctypes from ctypes.util import find_library find_library("".join(("gsdll", str(ctypes.sizeof(ctypes.c_voidp) * 8), ".dll"))) <name-of-ghostscript-library-on-windows>

2º I had to modify one of those path variables. a) I went to Control Panel → System and Security → System → Advanced System Settings → computer name, domain and workgroup settings → Advanced → Environment Variables b) Find the Path variable within System Variables, select it and click on edit. c) Next I copy the path to bin folder (in my case was C:\Program Files (x86)\gs\gs9.55.0\bin). In Windows 10, you can do this by clicking on New and entering the path. In other Windows versions, just append the path to the variable value, seperated by a semicolon.

I hope this will help you!

bsc-pmp avatar Nov 22 '21 22:11 bsc-pmp

Ran into the same issue. I was adding ghostscript to the path as:

set PATH="C:\Program Files\gs\gs9.55.0\bin";"C:\Program Files\gs\gs9.55.0\lib";%PATH%

Turns out the find_library implementation doesn't handle double quoted paths well and starts looking for the file: '"C:\Program Files\gs\gs9.55.0\bin"\gsdll64.dll'

Setting the path as: PATH=C:\Program Files\gs\gs9.55.0\bin;C:\Program Files\gs\gs9.55.0\lib;%PATH%

fixed the problem

sameer-narang avatar Jan 11 '22 20:01 sameer-narang

hello: I try run

import camelot tables = camelot.read_pdf('WL-YL-05-2021H1-南京书影文化传媒有限公司-不良人.pdf') in python 3.6

but the result is:

OSError: Ghostscript is not installed. You can install it using the instructions here: https://camelot-py.readthedocs.io/en/master/user/install-deps.html

however, but I have install it by pip~~why? thank you very much!!!

the link https://ghostscript.com/releases/index.html/gsdnld.html is no longer working.

Sid19GitRepo avatar Jun 11 '22 11:06 Sid19GitRepo

Install the ghostscript through https://www.ghostscript.com/releases/gsdnld.html If you are in windows go to environment variable -> user variable -> path -> new ->

  • C:\Program Files\gs\gs10.01.1\temp
  • C:\Program Files\gs\gs10.01.1\bin Note: the above two path name can be different in your machine, basically it's the path name of the application you have downloaded. But, mostly the two path name it will be same in your machine(version in my case it's 10.01.1, in future your --v can be different), There you go! you got this

technoadnan avatar Apr 13 '23 21:04 technoadnan

This works for me on Windows 10:

  1. first install ghostscript from https://www.ghostscript.com/releases/gsdnld.html
  2. then pip install ghostscript in your python virtual environment

GitAronas avatar Sep 26 '23 14:09 GitAronas