Hadoop: Python client driver for HiveServer2 fails to install Hadoop: Python client driver for HiveServer2 fails to install hadoop hadoop

Hadoop: Python client driver for HiveServer2 fails to install


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.gztar xzf cyrus-sasl-2.1.26.tar.gzcd cyrus-sasl-2.1.26./configure && make install


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_64sudo pip install pyhs2


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