美文网首页
linux下安装python-hive驱动库

linux下安装python-hive驱动库

作者: mysimplebook | 来源:发表于2020-12-11 19:53 被阅读0次

    查看系统发型版本

    [root@bogon Python-3.6.1]# cat /proc/version Linux version 3.10.0-229.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) ) #1 SMP Fri Mar 6 11:36:42 UTC 2015

    首先安装

    [root@bogon Python-3.6.1]# yum -y install cyrus-sasl cyrus-sasl-devel cyrus-sasl-lib

    否则Centos中报错:sasl/sasl.h no such dir

    再依次安装

    [root@bogon Python-3.6.1]# python3 -m pip install sasl

    [root@bogon Python-3.6.1]# python3 -m pip install thrift

    [root@bogon Python-3.6.1]# pip install thrift-sasl==0.3.0

    [root@bogon Python-3.6.1]# pip install PyHive

    至此OK

    [root@bogon Python-3.6.1]# python3

    Python 3.6.1 (default, Dec 11 2020, 18:24:40)

    [GCC 4.8.3 20140911 (Red Hat 4.8.3-9)] on linux

    Type "help", "copyright", "credits" or "license" for more information.

    >>> from pyhive import hive

    >>>

    相关文章

      网友评论

          本文标题:linux下安装python-hive驱动库

          本文链接:https://www.haomeiwen.com/subject/qnksgktx.html