CentOS7下安装superset

2023-05-16

目录

  • 一、前言
  • 二、安装 Miniconda
    • 1.下载
    • 2.安装
    • 3.加载环境变量配置文件
    • 4.取消激活 base 环境
  • 三、创建 Python3.9 环境
    • 1.配置 conda 国内镜像
    • 2.创建 superset 环境并指定 Python3.9
    • 3.激活 superset 环境
    • 4.查看 python 版本确认
  • 四、Superset 部署
    • 1.安装依赖
    • 2.安装 setuptools 和 pip
    • 3.安装 Supetset
    • 4.初始化 Supetset 数据库
      • (1)Could not locate a Flask application. Use the 'flask --app' option, 'FLASK_APP' environment variable, or a 'wsgi.py' or 'app.py' file in the current directory.
      • (2)ImportError: cannot import name 'soft_unicode' from 'markupsafe
      • (3)ModuleNotFoundError: No module named 'werkzeug.wrappers.etag'
      • (4)TypeError: __init__() got an unexpected keyword argument 'unbound_message
      • (5)ModuleNotFoundError: No module named 'wtforms.ext
    • 5.创建管理员用户
    • 6.Superset 初始化
  • 五、superset 启动
    • 1.安装 gunicorn
    • 2.启动 Superset
      • (1)对外开放端口 8080
      • (2)启动
      • (3)登录 Superset
    • 3.停止 Superset
    • 4.退出 Superset 环境


一、前言

Superset 由 Python 语言编写,Superset2.0 版要求 Python3.9 的环境。

二、安装 Miniconda

Miniconda 是一个开源的包、环境管理器,包括 Conda、Python。

1.下载

下载地址:https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh

2.安装

执行 Miniconda3-latest-Linux-x86_64.sh
安装过程中,要求指定安装路径,如:/usr/local/miniconda3

3.加载环境变量配置文件

source ~/.bashrc

4.取消激活 base 环境

conda config --set auto_activate_base false

三、创建 Python3.9 环境

1.配置 conda 国内镜像

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

2.创建 superset 环境并指定 Python3.9

conda create --name superset python=3.9

备注:
conda 常用命令:
创建环境:conda create -n env_name
查看所有环境:conda info --envs
删除一个环境:conda remove -n env_name --all

3.激活 superset 环境

conda activate superset

4.查看 python 版本确认

python -V

四、Superset 部署

conda activate superset

以下操作均在 superset 环境下进行。

1.安装依赖

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

2.安装 setuptools 和 pip

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

3.安装 Supetset

pip install apache-superset==2.0.0 -i https://pypi.douban.com/simple/

4.初始化 Supetset 数据库

superset db upgrade

常见问题:

(1)Could not locate a Flask application. Use the ‘flask --app’ option, ‘FLASK_APP’ environment variable, or a ‘wsgi.py’ or ‘app.py’ file in the current directory.

解决方法:
执行:export FLASK_APP=superset

(2)ImportError: cannot import name ‘soft_unicode’ from 'markupsafe

解决方法:
执行:python -m pip install markupsafe==2.0.1

(3)ModuleNotFoundError: No module named ‘werkzeug.wrappers.etag’

解决方法:
降低 Werkzeug 的版本:

python -m pip uninstall -y Werkzeug
python -m pip install Werkzeug==2.0.3

(4)TypeError: init() got an unexpected keyword argument 'unbound_message

解决方法:
降低 Flask 的版本:

python -m pip uninstall -y Flask
python -m pip install Flask==2.0.3

(5)ModuleNotFoundError: No module named 'wtforms.ext

解决方法:
降低 WTForms 的版本:

python -m pip uninstall -y WTForms
python -m pip install WTForms==2.3.3

5.创建管理员用户

export FLASK_APP=superset
superset fab create-admin

6.Superset 初始化

superset init

五、superset 启动

1.安装 gunicorn

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

2.启动 Superset

(1)对外开放端口 8080

/sbin/iptables -I INPUT -p tcp --dport 8080 -j ACCEPT

(2)启动

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

(3)登录 Superset

http://IP地址:8080

3.停止 Superset

ps -ef | awk '/superset/ && !/awk/{print $2}' | xargs kill -9

4.退出 Superset 环境

conda deactivate
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

CentOS7下安装superset 的相关文章

随机推荐

  • 删除容器命令

    删除容器使用 docker rm 命令 1 删除容器 1 首先需要停止所有的容器 docker stop docker ps a q 2 删除所有的容器 只删除单个时把后面的变量改为container id即可 docker rm dock
  • 正则 (?:)

    X 在正 则中表示所匹配的子组X不作为结果输出 正常情况 X 中的X会被作为新增的一个组序号输出 xff0c 比如 A B xff0c A的序号1 B的序号2 如果 A B xff0c A将没有序号不输出 B的序号为1 规范化url xff
  • 用maven-replacer插件选择正则表达式替换

    在前端html或者jsp中会引入一些诸如css js等静态资源 xff0c 但是有时候浏览器会有缓存 xff0c 更新js后 xff0c 返现一些用户看到的仍然是旧的 xff0c 说明没有生效 这样的话一般是在引入静态资源的时候添加时间戳
  • 【LeetCode股票买卖系列:123. 买卖股票的最佳时机 III 暴力递归=>记忆化搜索=>动态规划】

    x1f680 算法题 x1f680 x1f332 算法刷题专栏 面试必备算法 面试高频算法 x1f340 x1f332 越难的东西 越要努力坚持 xff0c 因为它具有很高的价值 xff0c 算法就是这样 x1f332 作者简介 xff1a
  • [模版]线段树

    span class token macro property span class token directive hash span span class token directive keyword include span spa
  • 判断是否属于同一子网

    include lt bits stdc 43 43 h gt using namespace std int main char a 10 b1 10 b2 10 while scanf 34 s s s 34 a b1 b2 61 EO
  • 单点登录之cas6.5安装部署

    目录 一 准备工作二 安装 jdk11三 安装gradle三 安装tomcat四 下载cas并编译五 部署六 访问 一 准备工作 需要的包 xff1a jdk11 tomcat9 GRADLE7 2 cas overlay template
  • 单点登录之cas集成禅道

    目录 一 前言二 添加应用 xff0c 开启免密登录三 请求格式 一 前言 禅道11 5 1版本开始 xff0c 增加了第三方应用免密登录禅道的功能 xff0c 可以利用此功能实现单点登录 二 添加应用 xff0c 开启免密登录 三 请求格
  • Oracle ora-12514报错解决方法

    目录 一 问题描述二 解决方法 一 问题描述 Oracle 报错 ora 12514 二 解决方法 修改 tnsnames ora xff0c 一般在 D oracle product 10 2 0 client 1 NETWORK ADM
  • “你需要来自XXX的权限才能对此文件夹进行更改”的解决方法

    目录 一 问题描述二 解决方法1 方法1 xff1a 鼠标右键文件夹 xff0c 选择 属性 gt 安全 选项卡 xff0c 对用户进行授权2 方法2 xff1a 选择 高级 xff0c 更改所有者 xff0c 并添加至权限条目3 方法3
  • windows10获取超级管理员权限

    目录 一 新建文本文件 xff0c 命名为带 reg后缀的文件 xff0c 添加以下内容二 鼠标双击运行三 鼠标右键要获取权限的文件夹 xff0c 选择 获取超级管理员权限 一 新建文本文件 xff0c 命名为带 reg后缀的文件 xff0
  • python2.7安装

    目录 一 下载二 安装三 设置环境变量四 验证 一 下载 1 通过 python 官网 https www python org 找到 2 7 版本进行下载 xff1a https www python org downloads rele
  • sharding报错no table route info

    目录 一 问题描述二 解决方法 一 问题描述 集成 sharding 执行数据库操作报错 xff1a no table route info 二 解决方法 一般为分库分表策略配置错误 xff0c 请检查 application yml 文件
  • Nginx配置http跳转https

    目录 一 return 301二 rewrite三 497 状态码四 meta 刷新 Nginx 可通过多种方式实现 http 跳转 https xff0c 以下列出各种方式的实现方法 一 return 301 这是 Nginx 新版本的写
  • OpenFlow网络、OpenFlow交换机及OpenFlow协议的知识总结

    目录 OpenFlow起源与发展 OpenFlow网络 1 OpenFlow交换机 xff1a 2 FlowVisor xff1a 3 Controller xff1a OpenFlow交换机 分类 安全通道 流表 OpenFlow协议 x
  • 【高效运维】Jenkins之uni-app自动化部署

    目录 一 前言二 使用 Pipeline 创建任务1 创建一个流水线任务2 配置流水线 xff08 1 xff09 配置构建触发器 xff08 2 xff09 配置流水线 xff08 Pipeline script from SCM xff
  • Windows下安装Redis7.0.8

    目录 一 下载二 解压三 启动服务四 客户端连接测试五 把 redis 安装到服务1 安装2 启动服务3 停止服务4 卸载服务 一 下载 官网上没有 windows 版本的 redis 下载 xff0c 需要到 github 下载 xff1
  • 若依微服务版之集成Mybatis-Plus和Lombok

    目录 一 修改根目录 pom xml二 修改 ruoyi common core 的 pom xml三 去掉 nacos 配置文件中的 mybatis 配置 xff0c 添加 mybatis plus 配置四 添加配置类并注入五 注入类六
  • Windows下安装JDK

    目录 一 下载二 安装三 设置环境变量1 新增环境变量 JAVA HOME2 新增环境变量 CLASS PATH3 环境变量 PATH 添加变量值 四 验证 一 下载 下载链接 xff1a https www oracle com java
  • CentOS7下安装superset

    目录 一 前言二 安装 Miniconda1 下载2 安装3 加载环境变量配置文件4 取消激活 base 环境 三 创建 Python3 9 环境1 配置 conda 国内镜像2 创建 superset 环境并指定 Python3 93 激