An error occurred during the installation of TESSEROCR.
C:\USERS\ADMINISTRATOR>PIP3 Install TESSEROCR Pillow
Collecting TESSEROCR
Using Cached https://files.pythonhosted.org/packages/cf/0d/ 9e554f041962b8dd7acd978330535fed879452bb0af257c287ca4ae9c525/tesserocr-2.2.2.tar.gz
Requirement already satisfied:pillow in D:\anaconda\lib\site-packages (5.0.0)
Building Wheels for collected PACKAGES:TESSEROCR
Running setup.py bdist_wheel for TESSEROCR ... error
Complete output from command D:\anaconda\python.exe-u-C "Import setuptools, tokenize;__file__= ' c:\\users\\admini~1\\ Appdata\\local\\temp\\pip-install-i9u0iczd\\tesserocr\\setup.py '; f=getattr (tokenize, ' open ', open) (__file__); Code=f.read (). replace (' \ r \ n ', ' \ n '); F.close (); Exec (compile (code, __file__, ' exec ')) "Bdist_wheel-d c:\users\admini~ 1\appdata\local\temp\pip-wheel-op2ibo5_--python-tag cp36:
Supporting Tesseract v3.05.01
Building with configs: {' Libraries ': [' tesseract ', ' lept '], ' cython_compile_time_env ': {' tesseract_version ': 197889}}
Running Bdist_wheel
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\2017\professional\vc\tools\msvc\14.12.25827\bin\hostx86\x64\cl.exe/ C/nologo/ox/w3/gl/dndebug/md-id:\anaconda\include-id:\anaconda\include "-ic:\program Files (x86) \Microsoft Visual Studio\2017\professional\vc\tools\msvc\14.12.25827\atlmfc\include ""-ic:\program Files (x86) \Microsoft Visual Studio\2017\professional\vc\tools\msvc\14.12.25827\include ""-ic:\program Files (x86) \ Windows kits\netfxsdk\4.6.1\ Include\um "-ic:\program files (x86) \ Windows Kits\10\include\10.0.16299.0\ucrt" "-ic:\program files (x86) \ Windows Kits\10\include\10.0.16299.0\shared "-ic:\program Files (x86) \ Windows Kits\10\include\10.0.16299.0\um" "-IC:\ Program Files (x86) \ Windows KITS\10\INCLUDE\10.0.16299.0\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\\2017\\professional\\vc\\tools\\msvc\\14.12.25827\\ Bin\\hostx86\\x64\\cl.exe ' failed with exit status 2
----------------------------------------
Failed Building Wheel for TESSEROCR
Running setup.py Clean for TESSEROCR
Failed to build TESSEROCR
Installing collected PACKAGES:TESSEROCR
Running setup.py Install for TESSEROCR ... error
Complete output from command D:\anaconda\python.exe-u-C "Import setuptools, tokenize;__file__= ' c:\\users\\admini~1\\ Appdata\\local\\temp\\pip-install-i9u0iczd\\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\ Admini~1\appdata\local\temp\pip-record-1olmw2pc\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\2017\professional\vc\tools\msvc\14.12.25827\bin\hostx86\x64\cl.exe/ C/nologo/ox/w3/gl/dndebug/md-id:\anaconda\include-id:\anaconda\include "-ic:\program Files (x86) \Microsoft Visual Studio\2017\professional\vc\tools\msvc\14.12.25827\atlmfc\include ""-ic:\program Files (x86) \Microsoft Visual Studio\2017\professional\vc\tools\msvc\14.12.25827\include ""-ic:\program Files (x86) \ Windows kits\netfxsdk\4.6.1\ Include\um "-ic:\program files (x86) \ Windows Kits\10\include\10.0.16299.0\ucrt" "-ic:\program files (x86) \ Windows Kits\10\include\10.0.16299.0\shared "-ic:\program Files (x86) \ Windows Kits\10\include\10.0.16299.0\um" "-IC:\ Program Files (x86) \ Windows KITS\10\INCLUDE\10.0.16299.0\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\\2017\\professional\\vc\\tools\\msvc\\14.12.25827\\ Bin\\hostx86\\x64\\cl.exe ' failed with exit status 2
----------------------------------------
Command "D:\anaconda\python.exe-u-C" Import setuptools, tokenize;__file__= ' c:\\users\\admini~1\\appdata\\local\\ Temp\\pip-install-i9u0iczd\\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\admini~1\appdata\ Local\temp\pip-record-1olmw2pc\install-record.txt--single-version-externally-managed--compile "failed with error Code 1 in C:\users\admini~1\appdata\local\temp\pip-install-i9u0iczd\tesserocr\
Error as shown, I do not understand the beginning of the problem caused by the end, after I looked at the search results on the internet, I found that the original is the reason I installed the anaconda. At the same time, we found a solution.
The workaround is to type in cmd
Conda install-c Simonflueckiger TESSEROCR
Check the next Conda install found Conda is for Python. You can install Minconda or anaconda for installation. So we can install the Anaconda with the Conda install TESSEROCR
Reference links
78582737
80320625
Troubleshoot Windows installation TESSEROCR error Failed building wheel for TESSEROCR