Unable to get page count. Is poppler installed and in PATH?

解决办法:参考了网上其他解决方法是安装poppler,在pdf2image.py文件中convert_from_path函数poppler_path参数的值。

第一步:安装poppler

① 进入poppler官网poppler-windowsicon-default.png?t=N0U7https://blog.alivate.com.au/poppler-windows/

② 随便下载一个版本,我选了最新的

Unable to get page count. Is poppler installed and in PATH?_第1张图片

 第二步:设定poppler_path参数

① 将刚才下载的文件解压,并打开解压文件夹并找到bin目录 

Unable to get page count. Is poppler installed and in PATH?_第2张图片

 ② 修改pdf2image.py文件中convert_from_path函数poppler_path参数的值为poppler的安装路径

 

Unable to get page count. Is poppler installed and in PATH?_第3张图片

最后,运行原先的脚本就可以啦

你可能感兴趣的:(python,bug)