@phpkoder
Web-програмист

Ошибка при установке модуля tesseract-ocr на Python 3 через pip, что делать?

При попытке установить модуль tesseract-ocr , (Windows 10 x86) вылетает такая ошибка:
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\

Что делать, как установить этот модуль?
  • Вопрос задан
  • 785 просмотров
Пригласить эксперта
Ответы на вопрос 2
@Xilian
Программист 1С, сетевые технологии, SQL
Заголовков не хватает: https://github.com/DanBloomberg/leptonica
Ответ написан
Комментировать
@alexbprofit
Junior SE
on linux:

wget -c https://github.com/DanBloomberg/leptonica/archive/...
unzip master.zip
cd leptonica-master
./autogen.sh && ./configure && make && sudo make install
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы