title: 完美解决 HBase 连接 Python3.7
date: 2023-09-17 13:35:49
categories:
- mapreduce
tags:
目录导航
- 环境介绍
- 安装anaconda
2.1 安装
2.2 排查错误 - 安装thrift与安装hbase-thrift0.20.4.patch
3.1 安装thrift(了解虚拟环境)
3.2 安装thrift(正式)
3.3 安装hbase-thrift0.20.4.patch
3.4 报错解决 - 运行测试hbase与python交互
环境介绍
- Linux: Ubuntu 16.04 LTS
- Python: Anaconda 环境下的 Python 3.7
- HBase: HBase
- Hbase-thrift: hbase-thrift-0.20.4.patch
- Thrift:Thrift 0.16.0
安装 Anaconda
-
安装
1.1 下载 Anaconda 安装包
- 方法一:Anaconda 官网下载安装包
- 方法二:国内清华源下载 Anaconda 安装包:清华源 Anaconda 地址
我使用的是 Anaconda3-2020.02-Linux-x86_64.sh,也就是 Python 3.7 版本的 Anaconda
1.2 安装 Anaconda 安装包
注意: 一定不要用管理员权限安装,这个很重要!!!
在这里我是把我下载好的Anaconda3-2020.02-Linux-x86_64.sh放进了/usr/local/