Visual Studio cl.exe error in installing rpy2 - python

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

Related

installing pyGObject has an error in pycharm

while i'm trying to install pyGObject in my Pycharm. it does not work. and has an error :
error: command '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\x86_amd64\cl.exe"' failed with exit status 2]
and the output command :
running build_ext
building 'cairo._cairo' extension
creating build\temp.win-amd64-3.4
creating build\temp.win-amd64-3.4\Release
creating build\temp.win-amd64-3.4\Release\cairo
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\x86_amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=18 -DPYCAIRO_VERSION_MICRO=0 -IC:\Users\asus\PycharmProjects\Testt\venv\include -IC:\Python34\include -IC:\Python34\include /Tccairo/device.c /Fobuild\temp.win-amd64-3.4\Release\cairo/device.obj
device.c
c:\users\asus\appdata\local\temp\pycharm-packaging\pycairo\cairo\pycairo.h(37) : fatal error C1083: Cannot open include file: 'cairo.h': No such file or directory
error: command '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\Bin\x86_amd64\cl.exe"' failed with exit status 2
----------------------------------------
my python version is 3.4.8 and working in windows 8.1

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.

Error Installing tesseract-ocr Python 3.5 win 10

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

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