问题是 ocrmypdf pdf 无法找到 tesseract-engine 路径,即使我已经添加了环境变量。所以我需要一个快速的解决方案是否可以在Python中外部添加ocrmypdf.ocr()函数的路径。
即使导入了所有必需的库,但仍然无法正常工作 需要快速解决方案
您可以在Python脚本中定义路径,例如:
import pytesseract
# some code to process the image
pytesseract.pytesseract.tesseract_cmd=r'C:\Program Files\Tesseract-OCR\tesseract.exe'
#some other code for ocr