安装Pyhive需要以下依赖:sasl==0.2.1、thrift==0.13.0、thrift-sasl==0.4.2
以上安装完成后,安装pyhive成功。
导入pyhive包,connection连接hive时,报以下错误:thrift.transport.TTransport.TTransportException: Could not start SASL: b'Error in sasl_client_start (-4) SASL(-4): no mechanism available: No worthy mechs found'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/xindun/anaconda3/lib/python3.6/site-packages/pyhive/hive.py", line 192, in __init__
self._transport.open()
File "/home/xindun/anaconda3/lib/python3.6/site-packages/thrift_sasl/__init__.py", line 85, in open
message=("Could not start SASL: %s" % self.sasl.getError()))
thrift.transport.TTransport.TTransportException: Could not start SASL: b'Error in sasl_client_start (-4) SASL(-4): no mechanism available: No worthy mechs found'
>>> conn = hive.Connectio