superset

一、安装

1、下载Miniconda3

https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh

2、安装conda

bash Miniconda3-latest-Linux-x86_64.sh

3、加载环境变量并取消激活base环境

source ~/.bashrc
conda config --set auto_activate_base false

4、配置国内镜像

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
conda config --set show_channel_urls yes

5、创建python3.7环境并激活superset环境

conda create --name superset python=3.7
conda activate superset

6、安装依赖

sudo yum install -y gcc gcc-c++ libffi-devel python-devel python-pip python-wheel python-setuptools openssl-devel cyrus-sasl-devel openldap-devel

7、更新pip和setuptools

pip install --upgrade setuptools pip -i https://pypi.douban.com/simple/

8、安装superset

pip install apache-superset --trusted-host https://repo.huaweicloud.com -i https://repo.huaweicloud.com/repository/pypi/simple

9、初始化数据库

superset db upgrade

报错:

ImportError: cannot import name 'soft_unicode' from 'markupsafe' 

解决:

使用安装指定版本:python -m pip install markupsafe==2.0.1

又报错:

ImportError: cannot import name 'TypedDict' from 'typing' 

退出superset环境:conda deactivate

卸载superset:conda remove -n superset --all

安装python3.8:conda create --name superset python=3.8

激活superset:conda activate superset

重新执行6789步

执行superset db upgrade又报错

ImportError: cannot import name 'soft_unicode' from 'markupsafe' 

先执行export FLASK_APP=superset创建管理员用户在执行初始化数据库成功

10、创建管理员用户和密码

export FLASK_APP=superset
superset fab create-admin

11、初始化superset

superset init

12、安装插件

pip install gunicorn -i https://pypi.douban.com/simple/

13、启动superset

gunicorn --workers 5 --timeout 120 --bind hadoop102:8787  "superset.app:create_app()" --daemon

14、浏览器访问:主机名:8787

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值