Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/324.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/assembly/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Linux系统上安装Python Tesseract_Python_Linux_Runtime Error_Tesseract_Python Tesseract - Fatal编程技术网

在Linux系统上安装Python Tesseract

在Linux系统上安装Python Tesseract,python,linux,runtime-error,tesseract,python-tesseract,Python,Linux,Runtime Error,Tesseract,Python Tesseract,在linux系统上安装python tesseract时遇到问题。我一直在使用本教程: 我得到的错误是: File does not exist:['/usr/include/tesseract/capi.h', '/usr/local/include/tesseract/capi.h', '/opt/include/tesseract/capi.h', '/opt/local/include/tesseract/capi.h'] root@opencv:/home/philipp/pyth

在linux系统上安装python tesseract时遇到问题。我一直在使用本教程:

我得到的错误是:

 File does not exist:['/usr/include/tesseract/capi.h', '/usr/local/include/tesseract/capi.h', '/opt/include/tesseract/capi.h', '/opt/local/include/tesseract/capi.h']
root@opencv:/home/philipp/python-tesseract#
在运行
/python tesseract
中的
python setup.py时,按顺序执行其余说明后,请清除
/code>

在此系统上运行linux 3.2.0-4-amd64

其中是tesseract ocr
返回:

/usr/share/tesseract-ocr
/usr/include/leptonica
tesseract: /usr/bin/tesseract /usr/bin/X11/tesseract /usr/include/tesseract/ /usr/share/man/man1/tesseract.1.gz
leptonica在哪里
返回:

/usr/share/tesseract-ocr
/usr/include/leptonica
tesseract: /usr/bin/tesseract /usr/bin/X11/tesseract /usr/include/tesseract/ /usr/share/man/man1/tesseract.1.gz
其中是tesseract
返回:

/usr/share/tesseract-ocr
/usr/include/leptonica
tesseract: /usr/bin/tesseract /usr/bin/X11/tesseract /usr/include/tesseract/ /usr/share/man/man1/tesseract.1.gz
我还尝试运行了一些其他教程/指南来安装python tesseract,这些教程/指南返回了其他错误,例如,丢失了libleptonica,然后又丢失了libc6,但我没有对这些进行过太多的研究。只是想看看是否有其他导游马上就开始工作了。 此外,当我在终端中运行tesseract时,它会工作,但导入tesseract不会


我做错了什么?如何修复此问题并安装python tesseract?

我认为这种方法适合您:

1-从下载python-tesseract_0.9-0.5ubuntu3_livid_amd64.deb

2-安装gdebi核心

sudo apt-get install gdebi-core
3-使用gdebi安装python-tesseract_0.9-0.5ubuntu3_vivid_amd64.deb

sudo gdebi python-tesseract_0.9-0.5ubuntu2_i386.deb

哼我首先安装
libleptonica
libc6
。现在,您似乎已经安装了tesseract,但没有安装tesseract的python绑定。或者,它似乎可以通过
pip
获得。您能解释一下这将如何解决这个问题吗?这样,我们就可以让python tesseract几乎准备好工作了。剩下的就是在terminal:export TESSDATA_PREFIX=/usr/share/tesseract ocr/中配置环境变量TESSDATA_PREFIX,如下所示。我在ubuntu 14.04上安装python tesseract时遇到问题。当我尝试安装.deb文件时,安装过程中出现了依赖项问题,这个问题通过gdebi core解决,它允许安装.deb所需的依赖项。我希望有帮助。