【问题标题】:pytesseract WindowsError: [Error 5] Access is deniedpytesseract WindowsError: [错误 5] 访问被拒绝
【发布时间】:2017-12-05 10:33:57
【问题描述】:

我已经在 Windows 10 系统中安装了 pytesseract。当我尝试运行以下行时,

pytesser=pytesseract.image_to_string(image)

它抛出一个错误说,

WindowsError: [Error 5] Access is denied

即使更改了 tesseract_cmd 路径,它也会抛出相同的错误。

寻找其他可能的方法来解决这个问题。TIA

【问题讨论】:

  • 你的机器上是否安装了tesseract,试试c:\>tesseract,看看你的输出是否正确
  • 当我设置了确切的 .exe 路径时它起作用了。谢谢。

标签: python ocr tesseract access-denied


【解决方案1】:

除了 pytesseract.pytesseract.tesseract_cmd 的设置之外,您的代码可以正常工作。 tesseract_cmd 应设置为您机器中安装的 tesseract 可执行文件 文件。检查它是否指向那个

看看有没有帮助

Pytesseract Image_to_string returns Windows Error: Access denied error in Python

【讨论】:

    【解决方案2】:

    即使在 Windows 10、Python 3.7 和来自https://github.com/UB-Mannheim/tesseract/wiki 的 tesseract-ocr-w64-setup-v5.0.0-alpha.20200223.exe 中设置了 tesseract 可执行路径,我也在 2020 年遇到了这个 WinError5 访问拒绝问题在 Anaconda 中。

    这个解决方案对我有用。

    1. 卸载 tesseract
    2. 以管理员身份运行安装程序(右键单击安装程序选择运行方式)

    【讨论】:

      猜你喜欢
      • 2011-03-01
      • 1970-01-01
      • 1970-01-01
      • 2013-09-03
      • 2016-10-16
      • 2018-02-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多