Ghostscript 安装不正确 - find_library('gs') 返回 None

问题描述

我正在尝试安装 camelot,但由于某种原因 Ghostscript 无法正确安装,因此每当我尝试使用 read_pdf 时,我总是收到错误 RuntimeError: Please make sure that Ghostscript is installed

当我去检查是否使用 ctypes.util.find_library 安装了 Ghostscript 时,它找不到它。我已经在终端上使用自制软件安装了 Ghostscript(Warning: ghostscript 9.54.0 is already installed and up-to-date. 当我第二次尝试这样做时,我很确定它已安装)。

camelot 文档告诉我有问题,但没有具体说明是什么。

有人能说明我的错误在哪里吗?

解决方法

您需要为python安装ghostscript并将bin文件夹添加到环境变量路径中。