栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

superset

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

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

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/991007.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号