写在前面:本文章是根据尚硅谷的Superset教程改的,按照尚硅谷的教程有些代码行不通,通过查阅多方资料,最终搭建出一个可运行的Superset环境。
安装Miniconda
在linux中输入以下命令,开始安装Miniconda
bash Miniconda3-latest-Linux-x86_64.sh
随后会有让你选择安装位置,自己输入路径就好
接着 设置不自动开启 conda,不设置的话,开启虚拟机就自动进到conda环境里了
conda config --set auto_activate_base false
在conda里面,输入一下命令创建Python3.6环境
conda create -n superset python=3.6
切换到 Python3.6的 环境
conda activate superset
配置下载源
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
至此,配置superset的虚拟环境就完成一半了
在Python3.6环境里安装Superset
下载依赖
此时的命令都要在Python3.6环境(上一步创建的那个)里运行
yum install gcc gcc-c++ libffi-devel python-devel python-pip python-wheel python-setuptools openssl-devel cyrus-sasl-devel openldap-devel
更新setuptools pip包
pip install --upgr