Hadoop: Python client driver for HiveServer2 fails to install

后端 未结 3 1391
深忆病人
深忆病人 2020-12-14 09:36

I am trying to install a Python client driver for HiveServer2: https://cwiki.apache.org/confluence/display/Hive/Setting+Up+HiveServer2#SettingUpHiveServer2-PythonClientDrive

相关标签:
3条回答
  • 2020-12-14 10:02

    pyhs2 is great, it packages several needed python packages together for a dbapi, among them sasl. Note if you pip install sasl you'll get the same error.

    sasl (the python package) depends on libsasl2-dev (on a Debian/Ubuntu machine). The error you're seeing is that the compiler can't find the libraries that sasl is supposed to wrap.

    If you sudo apt-get install libsasl2-dev and rerun, it will likely be fixed.

    edit: Based on your comment, here's a robust way of getting this to work:

    curl -O -L ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-2.1.26.tar.gz
    tar xzf cyrus-sasl-2.1.26.tar.gz
    cd cyrus-sasl-2.1.26
    ./configure && make install
    
    0 讨论(0)
  • 2020-12-14 10:04

    Pyhs2 has the following dependencies:

    1. gcc-c++

    2. python-devel.x86_64

    3. cyrus-sasl-devel.x86_64

    So, just run this

    sudo yum install gcc-c++ python-devel.x86_64 cyrus-sasl-devel.x86_64
    
    sudo pip install pyhs2
    
    0 讨论(0)
  • 2020-12-14 10:19

    If you have an error in Windows when installing "sasl" with

    pip install sasl

    you can install pre-compiled packet.

    Download sasl packet for python36 in x64 from link: https://www.lfd.uci.edu/~gohlke/pythonlibs/#sasl

    Then run pip install sasl-0.2.1-cp36-cp36m-win_amd64.whl

    0 讨论(0)
提交回复
热议问题