Windows安装tessreocr踩雷

用Anaconda安装的Python环境,安装tesserocr时报错,tesserocr.cpp(555): fatal error C1083: Cannot open include file: 'leptonica/allheaders.h': No such file or directory

C:\Users\Administrator>pip install tesserocr pillow
Collecting tesserocr
  Using cached https://files.pythonhosted.org/packages/cf/0d/9e554f041962b8dd7ac
d978330535fed879452bb0af257c287ca4ae9c525/tesserocr-2.2.2.tar.gz
Requirement already satisfied: pillow in d:\programdata\anaconda3\lib\site-packa
ges (5.0.0)
Building wheels for collected packages: tesserocr
  Running setup.py bdist_wheel for tesserocr ... error
  Complete output from command d:\programdata\anaconda3\python.exe -u -c "import
 setuptools, tokenize;__file__='C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-i
nstall-qo9ktk0e\\tesserocr\\setup.py';f=getattr(tokenize, 'open', open)(__file__
);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'ex
ec'))" bdist_wheel -d C:\Users\ADMINI~1\AppData\Local\Temp\pip-wheel-_vovqp88 --
python-tag cp36:
  Supporting tesseract v3.05.01
  Building with configs: {'libraries': ['tesseract', 'lept'], 'cython_compile_ti
me_env': {'TESSERACT_VERSION': 197889}}
  running bdist_wheel
  running build
  running build_ext
  building 'tesserocr' extension
  creating build
  creating build\temp.win-amd64-3.6
  creating build\temp.win-amd64-3.6\Release
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c
 /nologo /Ox /W3 /GL /DNDEBUG /MD -Id:\programdata\anaconda3\include -Id:\progra
mdata\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\V
C\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt"
"-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (
x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\inc
lude\winrt" /EHsc /Tptesserocr.cpp /Fobuild\temp.win-amd64-3.6\Release\tesserocr
.obj
  tesserocr.cpp
  tesserocr.cpp(555): fatal error C1083: Cannot open include file: 'leptonica/al
lheaders.h': No such file or directory
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN
\\x86_amd64\\cl.exe' failed with exit status 2

  ----------------------------------------
  Failed building wheel for tesserocr
  Running setup.py clean for tesserocr
Failed to build tesserocr
Installing collected packages: tesserocr
  Running setup.py install for tesserocr ... error
    Complete output from command d:\programdata\anaconda3\python.exe -u -c "impo
rt setuptools, tokenize;__file__='C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip
-install-qo9ktk0e\\tesserocr\\setup.py';f=getattr(tokenize, 'open', open)(__file
__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, '
exec'))" install --record C:\Users\ADMINI~1\AppData\Local\Temp\pip-record-hal0op
96\install-record.txt --single-version-externally-managed --compile:
    Supporting tesseract v3.05.01
    Building with configs: {'libraries': ['tesseract', 'lept'], 'cython_compile_
time_env': {'TESSERACT_VERSION': 197889}}
    running install
    running build
    running build_ext
    building 'tesserocr' extension
    creating build
    creating build\temp.win-amd64-3.6
    creating build\temp.win-amd64-3.6\Release
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe
/c /nologo /Ox /W3 /GL /DNDEBUG /MD -Id:\programdata\anaconda3\include -Id:\prog
ramdata\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0
\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt
" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files
 (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\i
nclude\winrt" /EHsc /Tptesserocr.cpp /Fobuild\temp.win-amd64-3.6\Release\tessero
cr.obj
    tesserocr.cpp
    tesserocr.cpp(555): fatal error C1083: Cannot open include file: 'leptonica/
allheaders.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\B
IN\\x86_amd64\\cl.exe' failed with exit status 2

    ----------------------------------------
Command "d:\programdata\anaconda3\python.exe -u -c "import setuptools, tokenize;
__file__='C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-qo9ktk0e\\tesse
rocr\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replac
e('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --recor
d C:\Users\ADMINI~1\AppData\Local\Temp\pip-record-hal0op96\install-record.txt --
single-version-externally-managed --compile" failed with error code 1 in C:\User
s\ADMINI~1\AppData\Local\Temp\pip-install-qo9ktk0e\tesserocr\
解决方法:cmd中输入命令  conda install -c simonflueckiger tesserocr
            
阅读更多
个人分类: Python全栈之路
想对作者说点什么? 我来说一句

Tesseract-OCR中文训练库

2018年03月04日 18.13MB 下载

没有更多推荐了,返回首页

不良信息举报

Windows安装tessreocr踩雷

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭