• 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:usersv-lijessappdatalocalprogramspythonpython36-32libsite-packages (from pyhs2)
    Requirement already satisfied: six in c:usersv-lijessappdatalocalprogramspythonpython36-32libsite-packages (from sasl->pyhs2)
    Installing collected packages: sasl, pyhs2
      Running setup.py install for sasl ... error
        Complete output from command c:usersv-lijessappdatalocalprogramspythonpython36-32python.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('
    ', '
    ');f.close();exec(compile(code, __file__, 'exec'))" install --record C:Usersv-lijessAppDataLocalTemppip-tt9aqgea-recordinstall-record.txt --single-version-externally-managed --compile:
        running install
        running build
        running build_py
        creating build
        creating buildlib.win32-3.6
        creating buildlib.win32-3.6sasl
        copying sasl\__init__.py -> buildlib.win32-3.6sasl
        running egg_info
        writing sasl.egg-infoPKG-INFO
        writing dependency_links to sasl.egg-infodependency_links.txt
        writing requirements to sasl.egg-info
    equires.txt
        writing top-level names to sasl.egg-info	op_level.txt
        warning: manifest_maker: standard file '-c' not found
    
        reading manifest file 'sasl.egg-infoSOURCES.txt'
        reading manifest template 'MANIFEST.in'
        writing manifest file 'sasl.egg-infoSOURCES.txt'
        copying saslsaslwrapper.cpp -> buildlib.win32-3.6sasl
        copying saslsaslwrapper.h -> buildlib.win32-3.6sasl
        copying saslsaslwrapper.pyx -> buildlib.win32-3.6sasl
        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
    
    
  • 相关阅读:
    14.2.2.4 InnoDB Record, Gap, and Next-Key Locks
    Linux_PXE服务器_RHEL7
    Linux_PXE服务器_RHEL7
    Caused by: java.net.SocketException: Connection reset
    mysql read committed
    Linux_OpenSSH远程连接
    Linux_OpenSSH远程连接
    dns nsswitch.conf
    Python基本语法_强制数据类型转换
    Python基本语法_强制数据类型转换
  • 原文地址:https://www.cnblogs.com/Jesse-Li/p/8926702.html
Copyright © 2020-2023  润新知