我正在尝试从 Ubuntu 15.04 上的 deb 文件安装 python-tesseract 0.9-0.5,但它给出了几个错误。这就是我所做的:
1-我在终端上打开文件的路径并写入
sudo dpkg -i python-tesseract_0.9-0.5ubuntu2_i386.deb
2-在此之后,控制台显示几个错误:
Selecting previously unselected package python-tesseract.
(Reading database ... 349994 files and directories currently installed.)
Preparing to unpack python-tesseract_0.9-0.5ubuntu2_i386.deb ...
Unpacking python-tesseract (0.9-0.5ubuntu2) ...
dpkg: dependency problems prevent configuration of python-tesseract:
python-tesseract depends on python (<< 2.8).
python-tesseract depends on python (>= 2.7~).
python-tesseract depends on liblept4.
python-tesseract depends on libopencv-core2.4; however:
Package libopencv-core2.4:i386 is not installed.
python-tesseract depends on libtesseract3; however:
dpkg: error processing package python-tesseract (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
python-tesseract
3-只是为了检查,我打开安装文件并提取了 tesseract.py 类,并在 python 中单独使用。我是这样打开的:
python tesseract.py
,但我得到了这个:
Traceback (most recent call last):
File "tesseract.py", line 28, in <module>
_tesseract = swig_import_helper()
File "tesseract.py", line 20, in swig_import_helper
import _tesseract
ImportError: No module named _tesseract
问题是我想在 python 上使用 tesseract 函数来进行光学字符识别应用程序,我知道最好的包装器是 python-tesseract(我认为与 pytesseract 不同)。
我的问题是:如何在 Ubuntu 15.04 上安装 python-tesseract?非常感谢