выполнить этот код
from PIL import Image import pytesseract img = Image.open('pic11.png') img.load() i = pytesseract.image_to_string(img)
Установил PIL, pytesseract, но возникла проблема с установкой tesseract. Когда пытаюсь установить через pip выдает ошибку
C:\Users\admin>pip install tesseract-ocr Collecting tesseract-ocr Using cached tesseract-ocr-0.0.1.tar.gz Requirement already satisfied: cython in c:\users\admin\appdata\local\programs\python\python36-32\lib\site-packages (from tesseract-ocr) Installing collected packages: tesseract-ocr Running setup.py install for tesseract-ocr ... error Complete output from command c:\users\admin\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\admin\\AppData\\Local\\Temp\\pip-build-fnr23yhx\\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\admin\AppData\Local\Temp\pip-467cet62-record\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.6 creating build\temp.win32-3.6\Release C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\admin\appdata\local\programs\python\python36-32\include -Ic:\users\admin\appdata\local\programs\python\python36-32\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 /Tptesseract_ocr.cpp /Fobuild\temp.win32-3.6\Release\tesseract_ocr.obj tesseract_ocr.cpp tesseract_ocr.cpp(558): 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\\cl.exe' failed with exit status 2 ---------------------------------------- Command "c:\users\admin\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\admin\\AppData\\Local\\Temp\\pip-build-fnr23yhx\\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\admin\AppData\Local\Temp\pip-467cet62-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\admin\AppData\Local\Temp\pip-build-fnr23yhx\tesseract-ocr\
Если устанавливаю скачав установщик, он устанавливается но все равно при запускке кода выдает ошибку
Traceback (most recent call last): File "C:/Users/admin/IdeaProjects/poker/.idea/2.py", line 8, in <module> i = pytesseract.image_to_string(img) File "C:\Users\admin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pytesseract\pytesseract.py", line 122, in image_to_string config=config) File "C:\Users\admin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pytesseract\pytesseract.py", line 46, in run_tesseract proc = subprocess.Popen(command, stderr=subprocess.PIPE) File "C:\Users\admin\AppData\Local\Programs\Python\Python36-32\lib\subprocess.py", line 707, in __init__ restore_signals, start_new_session) File "C:\Users\admin\AppData\Local\Programs\Python\Python36-32\lib\subprocess.py", line 992, in _execute_child startupinfo) FileNotFoundError: [WinError 2] Не удается найти указанный файл Process finished with exit code 1
Помогите,пожалуйста, разобраться