B
B
Bogdan Karpov2018-05-14 14:35:08
Python
Bogdan Karpov, 2018-05-14 14:35:08

Error while installing tesseract-ocr module on Python 3 via pip, what should I do?

When trying to install the tesseract-ocr module, (Windows 10 x86) the following error occurs:

C:\Users\Богдан>pip install tesseract-ocr
Collecting tesseract-ocr
  Using cached https://files.pythonhosted.org/packages/e2/0d/dcee3dd0fc4c7bcd18125a98f8ba6d9db7aecaa40770595203e312649587/tesseract-ocr-0.0.1.tar.gz
Requirement already satisfied: cython in c:\users\богдан\appdata\local\programs\python\python37-32\lib\site-packages (from tesseract-ocr) (0.28.2)
Installing collected packages: tesseract-ocr
  Running setup.py install for tesseract-ocr ... error
    Complete output from command c:\users\богдан\appdata\local\programs\python\python37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\9234~1\\AppData\\Local\\Temp\\pip-install-yo9jn60o\\tesseract-ocr\\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\9234~1\AppData\Local\Temp\pip-record-8oh8cdi4\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    file tesseract_ocr.py (for module tesseract_ocr) not found
    file tesseract_ocr.py (for module tesseract_ocr) not found
    running build_ext
    building 'tesseract_ocr' extension
    creating build
    creating build\temp.win32-3.7
    creating build\temp.win32-3.7\Release
    C:\Program Files\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\богдан\appdata\local\programs\python\python37-32\include -Ic:\users\богдан\appdata\local\programs\python\python37-32\include "-IC:\Program Files\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files\Windows Kits\8.1\include\shared" "-IC:\Program Files\Windows Kits\8.1\include\um" "-IC:\Program Files\Windows Kits\8.1\include\winrt" /EHsc /Tptesseract_ocr.cpp /Fobuild\temp.win32-3.7\Release\tesseract_ocr.obj
    tesseract_ocr.cpp
    tesseract_ocr.cpp(599): fatal error C1083: Cannot open include file: 'leptonica/allheaders.h': No such file or directory
    error: command 'C:\\Program Files\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2

    ----------------------------------------
Command "c:\users\богдан\appdata\local\programs\python\python37-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\9234~1\\AppData\\Local\\Temp\\pip-install-yo9jn60o\\tesseract-ocr\\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\9234~1\AppData\Local\Temp\pip-record-8oh8cdi4\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\9234~1\AppData\Local\Temp\pip-install-yo9jn60o\tesseract-ocr\

What to do, how to install this module?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question