From d7b36eb6d67c184e8f96f5562523507567672590 Mon Sep 17 00:00:00 2001 From: Bruce-Jay Date: Fri, 20 Oct 2023 10:52:53 +0800 Subject: [PATCH] fix some bugs in installation --- Assignment5.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Assignment5.md b/Assignment5.md index ee8c98b..7a60112 100644 --- a/Assignment5.md +++ b/Assignment5.md @@ -85,9 +85,12 @@ ClickHouse也内置了许多机器学习算法,例如基于梯度下降的线 ### 二)登录数据仓库。Clickhouse数据仓库的登录有很多方式,比如用clickhouse客户端登录,用JDBC(在Java中使用)或者ODBC(在C/C++中使用)访问,用clickhouse-driver(在Python中使用)访问。本实验我们完成clickhouse客户端和clickhouse-driver两种方式。其余方式同学们以后可以自行尝试。 #### 1)使用Clickhouse客户端登录。创建一个最低配置的Centos云主机,选择按流量计费,20M带宽,云主机按小时付费。登录云主机以后运行以下命令,下载Clickhouse安装包。 + +因为网络原因,我们使用阿里云的镜像安装 + ``` -wget https://packages.clickhouse.com/rpm/lts/clickhouse-client-22.3.6.5.noarch.rpm -wget https://packages.clickhouse.com/rpm/lts/clickhouse-common-static-22.3.6.5.x86_64.rpm +wget https://mirrors.aliyun.com/clickhouse/rpm/lts/clickhouse-client-22.3.6.5.noarch.rpm +wget https://mirrors.aliyun.com/clickhouse/rpm/lts/clickhouse-common-static-22.3.6.5.x86_64.rpm ``` ##### 安装 ``` @@ -101,6 +104,7 @@ clickhouse-client --host=<下图任一节点IP地址> --port=9000 --user=admin - + > 登录后将看到如下界面 @@ -161,11 +165,13 @@ SELECT * FROM ck_test.regression; sudo yum install python3 sudo yum install python3-pip ``` -安装clickhouse-driver +安装clickhouse-driver,这里我们需要用阿里云镜像安装 ``` -pip3 install clickhouse-driver +pip3 install --user -i https://mirrors.aliyun.com/pypi/simple clickhouse-driver ``` +可能会报未找到 gcc 命令的错误,运行 `sudo yum install -y gcc` 就好~ + ##### 2.1)安装完毕后运行python3,然后import clickhouse_driver,若没有报错,则说明clickhouse_driver安装成功。