安装tesserocrerror命令' C:\\ Program Files(x86)\\ Microsoft Visual Studio 14.0 \\ VC \\ BIN \\ x86_amd64 \\ cl.exe'退出状态2失败

时间:2018-02-13 16:51:04

标签: python windows tesseract

在win10中安装tesserocr时出现以下错误,请使用python3.6

> C:\Users\asus>pip3 install tesserocr
Collecting tesserocr
  Using cached tesserocr-2.2.2.tar.gz
Installing collected packages: tesserocr
  Running setup.py install for tesserocr ... error
    Complete output from command c:\users\asus\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\asus\\AppData\\Local\\Temp\\pip-build-330ksjaf\\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\asus\AppData\Local\Temp\pip-jzvnjuro-record\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 -Ic:\users\asus\appdata\local\programs\python\python36\include -Ic:\users\asus\appdata\local\programs\python\python36\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\include\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/allheaders.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

    ----------------------------------------
Command "c:\users\asus\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\asus\\AppData\\Local\\Temp\\pip-build-330ksjaf\\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\asus\AppData\Local\Temp\pip-jzvnjuro-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\asus\AppData\Local\Temp\pip-build-330ksjaf\tesserocr\

1 个答案:

答案 0 :(得分:0)

Windows显然不是我的口味,但你需要有这个lib(头文件)leptonica/allheaders.h,这就是它失败的原因。我建议您在您选择的搜索引擎上使用您的搜索工作......

如果您有,请安装libleptonica-dev

所需标头为there

检查http://www.leptonica.com/