简体   繁体   中英

install tesserocrerror command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

The below error occurs while installing tesserocr in win10 ,use 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\

Windows is clearly not my taste, but you need to have this lib ( header file) leptonica/allheaders.h , that's why it fails. I recommend using your search effort a bit on searches engines of your choice...

If you have , install libleptonica-dev .

The required header is there

Check http://www.leptonica.com/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM