hive的访问一直是个很烦的事情,关于使用python链接hive的教程网上也有很多,在这里分享一下我安装的过程。环境为win7,anaconda管理 python3.6
先列一下要安装的包。一定要使用pip安装,因为很方便不容易出错。
six
bit_array
thriftpy
pure-sasl
thrift-sasl 安装这个时使用 pip install --no-deps thrift-sasl==0.2.1
impyla
千万不要安装sasl这个包!重点!!!
先运行 如果出错类似 can’t concate head and body 修改 thrift-sasl init.py 并重新编译
94行之前加
if (type(body) is str):
body = body.encode()
在编写代码的时候要用PLAIN这个模式。
安装是经历的那些心酸就不说了呜呜呜呜~~~~