1、安装minanaconda
(1)将minanaconda拖拽到虚拟机中,然后使用命令进行安装

[tom@bigdata1 software]$ rz -E
rz waiting to receive.
[tom@bigdata1 software]$ bash Miniconda3-latest-Linux-x86_64.sh

(2)点击enter回车

Please, press ENTER to continue
>>> 

(3)输入yes

Do you accept the license terms? [yes|no]
[no] >>> yes

(4)输入安装的目录/opt/module/miniconda3

[/home/tom/miniconda3] >>> /opt/module/miniconda3

(5)输入yes

Do you wish the installer to initialize Miniconda3
by running conda init? [yes|no]
[no] >>> yes

(6)安装成功

Thank you for installing Miniconda3!

2、进行相关设置
(1)设置

[tom@bigdata1 software]$ source ~/.bashrc
(base) [tom@bigdata1 software]$ conda config --set auto_activate_base false

(2)接着配置这个conda的镜像源

(base) [tom@bigdata1 software]$ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
(base) [tom@bigdata1 software]$ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
(base) [tom@bigdata1 software]$

(3)新建python3.9的环境,环境名为 superset

(base) [tom@bigdata1 software]$ conda create --name superset python=3.9

(4)测试相关命令

(base) [tom@bigdata1 software]$ conda activate superset
(superset) [tom@bigdata1 software]$ conda deactivate
(base) [tom@bigdata1 software]$ conda deactivate
[tom@bigdata1 software]$ conda activate superset
(superset) [tom@bigdata1 software]$ conda info --envs
# conda environments:
#
base                     /opt/module/miniconda3
superset              *  /opt/module/miniconda3/envs/superset

(5)查看当前superset的Python版本号

查看当前superset的Python版本号
(superset) [tom@bigdata1 software]$ python -V
Python 3.9.12

(6)接着看看Python能否正常使用

(superset) [tom@bigdata1 software]$ python
Python 3.9.12 (main, Jun  1 2022, 11:38:51) 
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
(superset) [tom@bigdata1 software]$ 

(7)安装系统依赖

(superset) [tom@bigdata1 software]$ sudo yum install -y gcc gcc-c++ libffi-devel python-devel python-pip python-wheel python-setuptools openssl-devel cyrus-sasl-devel openldap-devel

(8)更新setup和pip工具包

(superset) [tom@bigdata1 software]$ pip install --upgrade setuptools pip -i https://pypi.douban.com/simple/

(9)安装superset的命令

(superset) [tom@bigdata1 software]$ pip install apache-superset -i https://pypi.douban.com/simple/

(10)更改 markupsafe的版本

(superset) [tom@bigdata1 software]$ pip3 install --force-reinstall MarkupSafe==2.0.1

(11)设置环境变量

(superset) [tom@bigdata1 software]$ export FLASK_APP=superset

(12)初始化superset数据库

(superset) [tom@bigdata1 software]$ superset db upgrade

(13)创建管理员用户

(superset) [tom@bigdata1 software]$ superset fab create-admin

请添加图片描述
(14)superset初始化

(superset) [tom@bigdata1 software]$ superset init

3、启动superset
(1)安装gunicorn web容器

(superset) [tom@bigdata1 software]$ pip install gunicorn -i https://pypi.douban.com/simple/

(2)启动superset命令

(superset) [tom@bigdata1 software]$ gunicorn --workers 5 --timeout 120 --bind bigdata1:8787 "superset.app:create_app()" --daemon

(3)启动成功后,去浏览器打开superset的界面进行登录验证
在这里插入图片描述在这里插入图片描述

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐