Error Installing tesseract-ocr Python 3.5 win 10 - python

I have some problems with python . I'm trying to install python using pip :
-m pip install tesseract-ocr
for python 3.5 and here is the error I get:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\ANHVU\AppData\Local\Programs\Python\Python35\include -IC:\Users\ANHVU\AppData\Local\Programs\Python\Python35\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.win-amd64-3.5\Release\tesseract_ocr.obj
tesseract_ocr.cpp
tesseract_ocr.cpp(517): 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
How can I fix this? Tks for your help !

You can download wrapper and install it, also this package. But you should have tesseract-ocr installed on your PC

Related

Unable to install python ldap module on windows

Tried installing python-ldap, but failed
"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=3.4.0 "-DLDAPMODULE_AUTHOR=python-ldap project" "-DLDAPMODULE_LICENSE=Python style" -IModules -IC:\Users\rathod\AppData\Local\Programs\Python\Python39\include -IC:\Users\rathod\AppData\Local\Programs\Python\Python39\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /TcModules/LDAPObject.c /Fobuild\temp.win-amd64-cpython-39\Release\Modules/LDAPObject.obj
LDAPObject.c
c:\users\rathod\appdata\local\temp\pip-install-dkw9jd4z\python-ldap_05f9ed21408d4097a9c6bd894511d8b7\modules\common.h(15): fatal error C1083: Cannot open include file: 'lber.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for python-ldap
Failed to build python-ldap
ERROR: Could not build wheels for python-ldap, which is required to install pyproject. toml-based projects
Tried using few of the .whl files from https://www.lfd.uci.edu/~gohlke/pythonlibs/#_python-ldap, but failed
PS C:\Users\rathod\source\repos\00 Dell-Gitlab staging\replication_status> pip install .\python_ldap-3.4.0-cp311-cp311-win32.whl
ERROR: python_ldap-3.4.0-cp311-cp311-win32.whl is not a supported wheel on this platform.
Has anyone faced same challenge, and if there is any way to install this old module on windows system?

Visual Studio cl.exe error in installing rpy2

I am installing rpy2 in Django and got the following errors.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.15.26726\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I.\rpy\rinterface "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.15.26726\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.15.26726\include" /Tc.\rpy\rinterface\r_utils.c /Fobuild\temp.win-amd64-3.6\.\rpy\rinterface\r_utils.obj
r_utils.c
.\rpy\rinterface\r_utils.c(23): fatal error C1083: Cannot open include file: 'stdlib.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
Tried many solutions available in internet but none worked for me
also attaching my Visual studio installations list

OpenFST Installation Error on Windows With pip

I want to use openfst python wrapper on my python application.
When I run
pip install openfst
for Python 3.6 gave error as the following.
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\aliye\Anaconda3\include -IC:\Users\aliye\Anaconda3\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 /Tppywrapfst.cc /Fobuild\temp.win-amd64-3.6\Release\pywrapfst.obj -std=c++11 -Wno-unneeded-internal-declaration -Wno-unused-function
cl : Command line error D8021 : invalid numeric argument '/Wno-unneeded-internal-declaration'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
Obviously, it looks like the Visual Studio compiler is complaining about /Wno-unneeded-internal-declaration flag while it is trying to build the C extensions.
The easiest solution would be to download a pre-compiled version that matches your system at their website
Also, based on their site, it seems that they used Visual Studio 2013.You may be able to install and compile it using VS13.

Compiling with Cython on Windows: missing source filename

I'm trying to compile a hello world example with Cython on Windows 10.
I have visual studio 2015 community.
Python 3.5.2
My setup.py looks like this:
from distutils.core import setup
from Cython.Build import cythonize
setup (
name='print hello world',
ext_modules=cythonize("print_h_w.pyx", compiler_directives=
{'language_level': 3}),
)
The file I'm trying to compile looks like this:
print('Hello World')
I build with this command:
python setup.py build_ext --inplace
I keep getting this error:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe
/c /nologo /Ox /W3 /GL /DNDEBUG /MD -
IC:\Users\Paul\AppData\Local\Programs\Python\Python35\include -
IC:\Users\Paul\AppData\Local\Programs\Python\Python35\include "-IC:\Program
Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files
(x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files
(x86)\Windows Kits\10\include\10.0.14393.0\ucrt" "-IC:\Program Files
(x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files
(x86)\Windows Kits\10\include\10.0.14393.0\shared" "-IC:\Program Files
(x86)\Windows Kits\10\include\10.0.14393.0\um" "-IC:\Program Files
(x86)\Windows Kits\10\include\10.0.14393.0\winrt" "-IC:\Program Files
(x86)\Windows Kits\10\Include\10.0.14393.0\ucrt\" /Tcprint_h_w.c
/Fobuild\temp.win-amd64-3.5\Release\print_h_w.obj
cl : Command line error D8003 : missing source filename
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio
14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
I've been doing a lot of research but I've turned up a lot of nothing. How can I fix this?
I think you should have import cython in your print_h_w.pyx file :
import cython
print("hello world")

Can't install TA-lib python issue with Microsoft Visual Studio

Trying to do a simple pip install TA-lib but am getting errors, in install Microsoft visual studios 14 but still the problem persists.
error code http://pastebin.com/h4jHWd1m
I tried to install it manually but get this:
setup.py:77: UserWarning: Cannot find ta-lib library, installation may fail.
warnings.warn('Cannot find ta-lib library, installation may fail.')
running install
running build
running build_py
running build_ext
building 'talib.common' extension
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Python36-32\lib\site-packages\numpy\core\include -Ic:\ta-lib\c\include -IC:\Python36-32\include -IC:\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" /Tctalib/common.c /Fobuild\temp.win32-3.6\Release\talib/common.obj
common.c
talib/common.c(240): fatal error C1083: Cannot open include file: 'ta_libc.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
The problem seems to be the same, any ideas ?
SOLVED. I had to download this and unzip to c:\
See https://github.com/mrjbq7/ta-lib#dependencies
Download file TA_Lib-0.4.24-cp37-cp37m-win_amd64.whl from https://www.lfd.uci.edu/~gohlke/pythonlibs/#ta-lib
then use pip install TA_Lib-0.4.24-cp37-cp37m-win_amd64.whl

Categories

Resources