在Windows平台中将Ghostscript链接到pypdfocr

Ani*_*mik 2 windows ocr linker python-2.7 anaconda

通过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
Run Code Online (Sandbox Code Playgroud)

请求帮助链接这些库需要做些什么?

小智 5

您可以通过其页面上提供的安装程序直接安装Ghostscript - https://ghostscript.com/download/gsdnld.html

之后,您需要设置环境变量.

添加一个新的系统变量:

变量: GS_PROG

值: gswin64c.exe文件位置的完整路径(在GhostScript安装目录中 - 默认位置为C:\ Program Files\gs\gs9.21\bin\gswin64c.exe,但这可能因您所在的位置而异)安装它)