在使用python链接hive的时候需要安装依赖包

pip install sasl
pip install thrift
pip install thrift-sasl==0.3.0
pip install PyHive

在安装thrift-sasl的时候会出现报错:error: command 'gcc' failed with exit status 1。

解决方案如下

Debian/Ubuntu: 

sudo apt-get install python-dev libsasl2-dev gcc 

CentOS/RHEL: 

sudo yum install gcc-c++ python-devel.x86_64 cyrus-sasl-devel.x86_64
Logo

一站式 AI 云服务平台

更多推荐