I need to query into hive using python.
Currently I am using this source code.
https://cwiki.apache.org/confluence/display/Hive/Setting+Up+HiveServer2#SettingUpHiveServer2-PythonClientDriver
Issue is dependences for running this query is SASL and Thrift wrappers.
While installing the SASL package I am getting this error.
setup.py install
running install
running bdist_egg
running egg_info
writing sasl.egg-info\PKG-INFO
writing top-level names to sasl.egg-info\top_level.txt
writing dependency_links to sasl.egg-info\dependency_links.txt
reading manifest file 'sasl.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'sasl.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
running build_ext
building '_saslwrapper' extension
C:\Users\admin\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Isasl -IC:\Python27\include -IC:\Python27\PC /Tpsasl/saslwrapper.cpp /Fobuild\temp.win-amd64-2.7\Release\sasl/saslwrapper.objsaslwrapper.cpp
c:\users\admin\desktop\dddd\sasl-0.1.3.tar\dist\sasl-0.1.3\sasl-0.1.3\sasl\saslwrapper.h(20) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory
error: command 'C:\\Users\\admin\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2
Please provide a solution.
My environment: Win 7 64bit
Related
trying to install ripser on python 3.9.1 windiws version all dependencies have been pre install including build tools in microsoft visual. but when i run it i keep getting the following error.
ERROR: Command errored out with exit status 1:
command: 'c:\users\paula\appdata\local\programs\python\python39\python.exe' 'c:\users\paula\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\paula\AppData\Local\Temp\tmp45xjgsf6'
cwd: C:\Users\paula\AppData\Local\Temp\pip-install-k98qcrft\ripser_d73af33c4d364b9f9b927544c1bfdf2d
Complete output (21 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\ripser
copying ripser\ripser.py -> build\lib.win-amd64-3.9\ripser
copying ripser\_version.py -> build\lib.win-amd64-3.9\ripser
copying ripser\__init__.py -> build\lib.win-amd64-3.9\ripser
running build_ext
building 'pyRipser' extension
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\ripser
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DUSE_COEFFICIENTS=1 -DNDEBUG=1 -DASSEMBLE_REDUCTION_MATRIX=1 -I.\ripser -Ic:\users\paula\appdata\local\programs\python\python39\include -Ic:\users\paula\appdata\local\programs\python\python39\include -IC:\Users\paula\AppData\Local\Temp\pip-build-env-8p1qzbil\overlay\Lib\site-packages\numpy\core\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include /EHsc /Tpripser/pyRipser.cpp /Fobuild\temp.win-amd64-3.9\Release\ripser/pyRipser.obj -Ofast -D_hypot=hypot /std:c++14
cl : Command line warning D9025 : overriding '/Os' with '/Ot'
cl : Command line warning D9002 : ignoring unknown option '-Of'
cl : Command line warning D9002 : ignoring unknown option '-Oa'
pyRipser.cpp
c:\users\paula\appdata\local\programs\python\python39\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29333\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
----------------------------------------
ERROR: Failed building wheel for ripser
Failed to build ripser
ERROR: Could not build wheels for ripser which use PEP 517 and cannot be installed directly.
I've already tried pip install -- pre -U ripser which worked for sklearn but it wasn't working for this
any advice would be appreciated.
I have since installed ripser by deleting python and reinstalling as version 3.8.7. A lot of packages are not supported on python 3.9.1 and so installing things can be more difficult. On the older version of python i was able to reinstall all my packages with no issues.
I am getting this error trying to download cx_Freeze.
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\BregmanM\Downloads\cx_Freeze-5.0.2>python setup.py install
running install
running bdist_egg
running egg_info
writing cx_Freeze.egg-info\PKG-INFO
writing dependency_links to cx_Freeze.egg-info\dependency_links.txt
writing top-level names to cx_Freeze.egg-info\top_level.txt
reading manifest file 'cx_Freeze.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.txt'
writing manifest file 'cx_Freeze.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
running build_ext
building 'cx_Freeze.util' extension
cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\BregmanM\AppData\Local\Pro
grams\Python\Python36-32\include -IC:\Users\BregmanM\AppData\Local\Programs\Pyth
on\Python36-32\include /Tcsource/util.c /Fobuild\temp.win32-3.6\Release\source/u
til.obj
error: command 'cl.exe' failed: No such file or directory
But the problem here is I tied to fix the PATH issue and that did not work for me (python pip on Windows - command 'cl.exe' failed). I also must note, that I cannot just download using pip install because I am on a work computer that blocks me from doing so. My only option is to download the whl or tar.gz file. How can I go about fixing this? I am running on Python 3.6 so using py2exe will not work.
When I tried adding to PATH this is what I get:
cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\BregmanM\AppData\Local\Programs\Python\Python36-32\include -IC:\Users\BregmanM\AppData\Local\Programs\Python\Python36-32\include /Tcsource/util.c /Fobuild\temp.win32-3.6\Release\source/util.obj
error: command 'cl.exe' failed: No such file or directory
Here is what my directory looks like:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\cl.exe
I also have another 6 folders than contain cl.exe, but I'm assuming they are different. I even tried adding those to PATH but I get more errors.
I am trying to install Scrapy via the project interpreter but I end with the error. Later I tried installing using pip install Scrapy but I end up with the same error. The error details are:
running build_ext
generating cffi module 'build\\temp.win-amd64-2.7\\Release\\_padding.c'
already up-to-date
generating cffi module 'build\\temp.win-amd64-2.7\\Release\\_constant_time.c'
already up-to-date
generating cffi module 'build\\temp.win-amd64-2.7\\Release\\_openssl.c'
already up-to-date
building '_openssl' extension
C:\Users\xxxx\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\Python27\include "-IC:\aaaa\PC" /Tcbuild\temp.win-amd64-2.7\Release\_openssl.c /Fobuild\temp.win-amd64-2.7\Release\build\temp.win-amd64-2.7\Release\_openssl.obj
_openssl.c
build\temp.win-amd64-2.7\Release\_openssl.c(434) : fatal error C1083: Cannot open include file: 'openssl/opensslv.h': No such file or directory
error: command 'C:\\Users\\xxxx\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2
You could be missing Microsoft C++ for Python 2, since the file that cannot be opened is from it.
The download is here: https://www.microsoft.com/en-us/download/details.aspx?id=44266
I'm trying to compile Lupa on Windows 7 64bit, and I've installed all of the dependencies (including LuaJIT2 and Lua 5.2). But when I try to install by running
python setup.py install
I get errors regarding dependancies, usually .m files.
For example:
lupa/_lupa.c(265) : fatal error C1083: Cannot open include file:
'lua.h': No such file or directory
I've tried adding the files manually but it just leads to more issues, like this:
c:\mingw\include\stdint.h:118:0: note: this is the location of the previous definition
#define INT_LEAST64_MIN INT64_MIN
^
In file included from _lupa.c:271:0:
stdint.h:154:0: warning: "INT_LEAST64_MAX" redefined [enabled by default]
#define INT_LEAST64_MAX 0x7fffffffffffffff
^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\stdint.h:9:0,
from c:\mingw\include\wchar.h:876,
from unicodeobject.h:120,
from Python.h:85,
from _lupa.c:30:
c:\mingw\include\stdint.h:123:0: note: this is the location of the previous definition
#define INT_LEAST64_MAX INT64_MAX
^
In file included from _lupa.c:271:0:
stdint.h:155:0: warning: "UINT_LEAST64_MAX" redefined [enabled by default]
#define UINT_LEAST64_MAX 0xffffffffffffffffU
^
Please note this is a small excerpt from the spam I was getting in the console. I've tried more things than I can keep track of. I've tried using gcc to no avail and had friends try and help me. I'm completely stumped. Please help me!
Oh, and here's a full log of me trying to run the installer without changing files around:
No local build of LuaJIT2 found in lupa directory
Checking for installed luajit library using pkg-config
pkg-config found luajit version 2.0.3
building without Cython
running install
running bdist_egg
running egg_info
writing lupa.egg-info\PKG-INFO
writing top-level names to lupa.egg-info\top_level.txt
writing dependency_links to lupa.egg-info\dependency_links.txt
writing lupa.egg-info\PKG-INFO
writing top-level names to lupa.egg-info\top_level.txt
writing dependency_links to lupa.egg-info\dependency_links.txt
reading manifest file 'lupa.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'lupa.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
copying lupa\version.py -> build\lib.win-amd64-2.7\lupa
running build_ext
building 'lupa._lupa' extension
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64\cl.exe /c /nolog
o /Ox /MD /W3 /GS- /DNDEBUG -DLUA_COMPAT_ALL -I/usr/local/include/luajit-2.0 -IC
:\Python27\include -IC:\Python27\PC /Tclupa/_lupa.c /Fobuild\temp.win-amd64-2.7\
Release\lupa/_lupa.obj
_lupa.c
lupa/_lupa.c(265) : fatal error C1083: Cannot open include file: 'lua.h': No such file or directory
error: command '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\amd64
\cl.exe"' failed with exit status 2
I don't know if you still need the answer for this but I had the same problem and looked into lupa folder and saw lupa.pyx which implies you need Cython. Run pip install cython beforehand worked for me.
I am Getting this Exception while installing packages in Python.
uninstalled python and installed it again but there is no
C:\Users\ramasastri.g\Desktop\pycrypto-2.6>python setup.py install
running install
running build
running build_py
running build_ext
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
building 'Crypto.Random.OSRNG.winrandom' extension
C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Isrc/ -Isrc/inc-msvc/ -IC:\Python27\include -IC:\Python27\PC /Tcsrc/winrand.c /Fobuild\temp.win32-2.7\Release\src/winrand.obj
winrand.c
c:\python27\include\pyconfig.h(68) : fatal error C1083: Cannot open include file: 'io.h': No such file or directory
error: command '"C:\Program Files\Microsoft Visual Studio 10.0\VC\BIN\cl.exe"' failed with exit status 2
Probably you are missing the c++ compiler.
I installed it using a pre-packaged version from here
My problem was inside a virtualenv. I could not install some packages and got the same fatal error c1083. I was trying Visual Studio and PTVS. Just installing Microsoft Visual C++ Compiler for Python 2.7 https://www.microsoft.com/en-us/download/details.aspx?id=44266 was not enough to fix the error, despite it is needed.
I have found the solution here http://blog.ionelmc.ro/2014/12/21/compiling-python-extensions-on-windows/
The setuptools installed by virtualenv is too old (3.6). You need to remove it and reinstalling but, in the "Install python package" window in Visual Studio solution explorer, instead of using "setuptools" as the module name to install use "setuptools>=6.0".
Got the same error message and found the cause was that while I had set up the PATH variable correctly with the paths to Visual Studio and Python, I forgot to add the C:\Windows\System32 path.