python -- Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
用python读取hive数据,引用下面包。
#!/usr/bin/env python import pyhs2 as hive
先按照它
pip install pyhs2
出现错误
Collecting pyhs2 Using cached https://files.pythonhosted.org/packages/fd/12/151a1347077c0aa1c8c6b4a0f2d41a315f544e1b0f9cb41ff982c78cb2f8/pyhs2-0.6.0.tar.gz Collecting sasl (from pyhs2) Using cached https://files.pythonhosted.org/packages/8e/2c/45dae93d666aea8492678499e0999269b4e55f1829b1e4de5b8204706ad9/sasl-0.2.1.tar.gz Requirement already satisfied: thrift in c:\users\v-lijess\appdata\local\programs\python\python36-32\lib\site-packages (from pyhs2) Requirement already satisfied: six in c:\users\v-lijess\appdata\local\programs\python\python36-32\lib\site-packages (from sasl->pyhs2) Installing collected packages: sasl, pyhs2 Running setup.py install for sasl ... error Complete output from command c:\users\v-lijess\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\v-lijess\\AppData\\Local\\Temp\\pip-build-y79chlcw\\sasl\\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\v-lijess\AppData\Local\Temp\pip-tt9aqgea-record\install-record.txt --single-version-externally-managed --compile: running install running build running build_py creating build creating build\lib.win32-3.6 creating build\lib.win32-3.6\sasl copying sasl\__init__.py -> build\lib.win32-3.6\sasl running egg_info writing sasl.egg-info\PKG-INFO writing dependency_links to sasl.egg-info\dependency_links.txt writing requirements to sasl.egg-info\requires.txt writing top-level names to sasl.egg-info\top_level.txt warning: manifest_maker: standard file '-c' not found reading manifest file 'sasl.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'sasl.egg-info\SOURCES.txt' copying sasl\saslwrapper.cpp -> build\lib.win32-3.6\sasl copying sasl\saslwrapper.h -> build\lib.win32-3.6\sasl copying sasl\saslwrapper.pyx -> build\lib.win32-3.6\sasl running build_ext building 'sasl.saslwrapper' extension error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
解决方案。
1. 顺着提示连接安装插件
http://landinghub.visualstudio.com/visual-cpp-build-tools
2. 由于方案一安装VS的话,特别耗时,而且空间消耗比较大。所以我们用以下方案。
从https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyhdf找到自己的安装包,然后Pip
我的情况是要装sasl.
pip install sasl-0.2.1-cp36-cp36m-win32.whl
pip install pyhs2