Python 连接 Hive 过程中遇到很多问题,各种不识别包,impyla 等安装不上的问题
最后怎么解决的呢?
卸载 所有软件,按照步骤 安装 anaconda python pycharm
安装 pure-sasl
pip install pure-sasl
安装 thrift_sasl
pip install thrift_sasl==0.2.1 --no-deps
安装thrift
pip install thrift_sasl==0.2.1 --no-deps
安装最终的:impyla
pip install impyla
pip install thriftpy
最后
tetime
import pandas as pd
start = datetime.datetime.now()
print(“开始时间:” + time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(time.time())))
conn = connect(host=‘13.8.65.2’,port = 10000,auth_mechanism=‘PLAIN’)
cur=conn.cursor()
cur.execute("SELECT * FROM table limit 100 ")
row=cur.fetchall()
print(row)
连账号密码都没有输入 就连接成功了