通过pip安装安装了pypdfocr和ghostscript。但是,当 pypdfocr 在命令提示符下运行时:
[env27] C:\Users\888537>pypdfocr Hotel.pdf
ERROR: Could not find Ghostscript in the usual place; please specify it using your config file
请求帮助以了解如何链接这些库?
最佳答案
您可以通过其页面上给出的安装程序直接安装 Ghostscript - https://ghostscript.com/download/gsdnld.html
之后,您需要设置环境变量。
添加新的系统变量:
变量: GS_PROG
值: gswin64c.exe 文件位置的完整路径(在 GhostScript 安装目录中 - 默认位置为 C:\Program Files\gs\gs9.21\bin\gswin64c。 exe,但这可能会根据您安装的位置而有所不同)
关于windows - 在 Windows 平台中将 Ghostscript 链接到 pypdfocr,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37833723/