centos安装是和Python3.7的clickhouse-driver的库
时间: 2024-03-06 19:50:17 浏览: 121
在 CentOS 中安装 Python3.7 的 `clickhouse-driver` 库,可以按照以下步骤进行:
1. 安装 Python3.7
CentOS 7 自带的 Python 版本是 Python2.7,如果需要安装 Python3.7,可以使用以下命令:
```
sudo yum install -y centos-release-scl
sudo yum install -y rh-python37
```
安装完成后,可以使用以下命令启动 Python3.7:
```
scl enable rh-python37 bash
```
2. 安装依赖
安装 Python3.7 的 `clickhouse-driver` 库需要一些依赖,可以使用以下命令进行安装:
```
sudo yum install -y gcc openssl-devel libffi-devel python3-devel
```
3. 安装 `clickhouse-driver`
安装依赖后,可以使用以下命令安装 `clickhouse-driver`:
```
pip3 install clickhouse-driver
```
安装完成后,就可以在 Python3.7 中使用 `clickhouse-driver` 库了。
需要注意的是,在安装完 Python3.7 后,需要使用 `scl enable rh-python37 bash` 命令启动 Python3.7,否则默认使用的是系统自带的 Python2.7。
阅读全文
相关推荐












