如何在Windows上安装tesserocr?

问题描述 投票:6回答:3

我下载了tesseract-OCR的可执行文件并安装了它。另一方面,我还从http://www.leptonica.com/download.html下载了leptonica的zip文件。它包括两个目录,即libinclude

接下来我尝试在python虚拟环境中执行qazxsw poi并返回错误

pip install tesserocr

我注意到 tesserocr.cpp(460) : fatal error C1083: Cannot open include file: 'leptonica/allheaders.h': No such file or directory 位于我之前下载的leptonica文件的allheaders.h目录中。我该如何解决这个问题?我应该把leptonica的目录includeinclude放到哪里才能完成这项工作?

有没有其他方法来安装lib并在Windows计算机上正确使用tesseract-ocr?目前我使用Windows 10运行我的python脚本,使用tesseract-ocr识别图像上的某些字符。我还计划稍后在Windows 7计算机上运行该脚本。

谢谢您的帮助。

python windows-10 tesseract windows-7-x64
3个回答
4
投票

使用Anaconda在名为tesserocr的环境中安装TesserOCR

  1. OCR安装Anaconda for Windows
  2. 打开Anaconda提示: here conda create -n OCR python=3.6
  3. 对于tesseract 3.5.1(稳定): activate OCR OR for tesseract 4.0.0(实验性): conda install -c simonflueckiger tesserocr 或者从conda install -c simonflueckiger/label/tesseract-4.0.0-master tesserocr下载与Windows平台和Python安装相匹配的wheel文件,并通过以下方式安装: here

0
投票

这种方法对我很有用:使用Anaconda在名为OCR的环境中安装TesserOCR

pip install <path_to_your_wheel_file>

Install Anaconda for Windows from here Open Anaconda Prompt: conda create -n OCR python=2.7 activate OCR You should install Anaconda and tesserac 并在prompt命令中写入

https://www.anaconda.com/distribution/#download-section

-1
投票

基本上,要在Windows上安装任何软件包,请转到LIBS位置并运行该命令

conda install -c simonflueckiger tesserocr

conda install -c simonflueckiger/label/tesseract-4.0.0-master tesserocr

对于tesseract或遵循这里: "py -3.4 -m pip install SomePackage"

要么

从这里下载设置(http://emop.tamu.edu/Installing-Tesseract-Windows8)并双击设置。希望能帮助到你。

© www.soinside.com 2019 - 2024. All rights reserved.