我下载了tesseract-OCR的可执行文件并安装了它。另一方面,我还从http://www.leptonica.com/download.html下载了leptonica的zip文件。它包括两个目录,即lib
和include
。
接下来我尝试在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的目录include
和include
放到哪里才能完成这项工作?
有没有其他方法来安装lib
并在Windows计算机上正确使用tesseract-ocr
?目前我使用Windows 10运行我的python脚本,使用tesseract-ocr识别图像上的某些字符。我还计划稍后在Windows 7计算机上运行该脚本。
谢谢您的帮助。
使用Anaconda在名为tesserocr
的环境中安装TesserOCR
OCR
安装Anaconda for Windowsconda create -n OCR python=3.6
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这种方法对我很有用:使用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
基本上,要在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)并双击设置。希望能帮助到你。