Erlo

Python3安装impala

2019-08-13 14:02:52 发布   512 浏览  
页面报错/反馈
收藏 点赞

步骤:

1.安装Visual C++,目前最新是2019版

  安装工作负载c++桌面开发

  

2.pip3安装模块

pip3 install pure-sasl==0.5.1
pip3 install thrift-sasl==0.2.1 --no-deps
pip3 install thrift==0.9.3
pip3 install impyla==0.14.1
pip3 install bitarray==0.8.3
pip3 install thriftpy==0.3.9

安装时报错:

# TypeError: can't concat str to bytes

3.改错

编辑   python安装目录/site-packages/thrift_sasl/__init__.py

# 定位到错误的最后一条,在init.py第94行 (注意代码的缩进)

header = struct.pack(">BI", status, len(body))
self._trans.write(header + body)

更改为:

header = struct.pack(">BI", status, len(body))
if(type(body) is str):
    body = body.encode() 
self._trans.write(header + body)

4.重新pip安装

登录查看全部

参与评论

评论留言

还没有评论留言,赶紧来抢楼吧~~

手机查看

返回顶部

给这篇文章打个标签吧~

棒极了 糟糕透顶 好文章 PHP JAVA JS 小程序 Python SEO MySql 确认