问题描述
我正在尝试编写一些代码来从 pdf 中提取文本,并按照 pypi 上的说明在 Windows 上安装 pdf2image 和 poppler。我也改变了路径。好吧,python 上建议的命令不起作用,它不断产生以下错误:
== RESTART: C:\Users\Elisabeth\AppData\Local\Programs\Python\Python39\test.py ==
Traceback (most recent call last):
File "C:\Users\Elisabeth\AppData\Local\Programs\Python\Python39\lib\site-packages\pdf2image\pdf2image.py",line 441,in pdfinfo_from_path
proc = Popen(command,env=env,stdout=PIPE,stderr=PIPE)
File "C:\Users\Elisabeth\AppData\Local\Programs\Python\Python39\lib\subprocess.py",line 951,in __init__
self._execute_child(args,executable,preexec_fn,close_fds,File "C:\Users\Elisabeth\AppData\Local\Programs\Python\Python39\lib\subprocess.py",line 1420,in _execute_child
hp,ht,pid,tid = _winapi.CreateProcess(executable,args,FileNotFoundError: [WinError 2] Das System kann die angegebene Datei nicht finden
我使用的代码:
from pdf2image import convert_from_path
from pdf2image.exceptions import (
PDFInfoNotInstalledError,PDFPageCountError,PDFSyntaxError
)
images = convert_from_path(r'C:\Users\Elisabeth\Documents\Anleitungen\C:/Users/Elisabeth/Documents/Anleitungen/t490s_x390_ug_de.pdf')
我做了什么来解决问题,但没有奏效: 卸载 poppler 和 pdf2path 并重新安装。我也用过不同版本的poppler。
我只是被困住了,有没有可能寻求帮助?
谢谢
伊莱莎
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)