python连接hive报错Could not start SASL: Error in sasl_client_start (-4) SASL(-4): no mechanism available

python连接hive报错:
thrift.transport.TTransport.TTransportException: Could not start SASL: Error in sasl_client_start (-4) SASL(-4): no mechanism available: Unable to find a callback: 2
在window下测试连接hive,出现这个错误,我没有解决。

把代码放到linux上执行,也会出现这个错误,不过下载下面两个模块,就能成功执行。

 yum install cyrus-sasl-plain  cyrus-sasl-devel  cyrus-sasl-gssapi

或者

sudo yum install apache-maven ant asciidoc cyrus-sasl-devel cyrus-sasl-gssapi gcc gcc-c++ krb5-devel libxml2-devel libxslt-devel make mysql mysql-devel openldap-devel python-devel sqlite-devel gmp-devel

你可能感兴趣的:(python连接hive)