Hadoop: Python client driver for HiveServer2 fails to install

雨燕双飞 提交于 2019-11-28 20:39:06
metaperture

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
Puneet Sharma

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

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!