Direct pip install impala does not work, follow the steps below to install it successfully!
Just install it all the way
1、 pip install six
2、 pip install bit_array
3、 pip install thriftpy
4、 pip install thrift_sasl
5、 pip install impyla
test:
from impala.dbapi import connect
If no error is reported, the installation is successful!
Supplementary knowledge: python3 install impala-related packages
Install related package order
pip3 install six bit_array bitarray
pip3 install thriftpy==0.3.8 pure-sasl
pip3 install thrift-sasl==0.2.1--no-deps
pip3 install impyla==0.14.1
Then modify the \thrift_sasl_init_.py file
Generally this file is in /usr/local/lib/python3.6/site-packages/
Modify this function on line 94
def _send_message(self, status, body):
header = struct.pack(" BI",status,len(body))if(type(body) is str): # add
body = body.encode() # add
self._trans.write(header + body)
self._trans.flush()
The above steps for installing the impala package in python are all the content shared by the editor. I hope to give you a reference.
Recommended Posts