superset 安装 MySQL 驱动:mysqlclient 作者:马育民 • 2022-05-19 07:53 • 阅读:10200 # 说明 官方推荐安装 mysqlclient 驱动,见 [官网说明](https://superset.apache.org/docs/databases/installing-database-drivers/ "官网说明") # 启动 superset 虚拟环境 进入 superset 的虚拟环境 ``` cd /program/superset/ ``` ``` . venv/bin/activate ``` 执行结果如下: ``` (venv) [root@hadoop1 superset]# ``` 看到上面 `(venv) ` ,说明启动成功 # 更新(可略) ``` pip3 install --upgrade pip ``` ``` pip install --upgrade setuptools ``` # 安装 mysql-devel(可略) 可能需要安装 mysql-devel,编译MySQL客户程序 安装 mysqlclient时会报错如下,就说明没安装该包: ``` /bin/sh: mysql_config: 未找到命令 /bin/sh: mariadb_config: 未找到命令 /bin/sh: mysql_config: 未找到命令 ``` 安装命令如下: ``` yum install -y mysql-devel ``` # 安装 mysqlclient ``` pip3 install mysqlclient ``` # 需要重启superset(可不重启) ### 查看状态 ``` ./superset.sh status ``` ### 停止 ``` ./superset.sh stop ``` ### 启动 ``` ./superset.sh start ``` 原文出处:http://www.malaoshi.top/show_1IX3L2HpgXWI.html