产品101
  • 目录
  • 国内App常用的4种登录方式
  • 本机号码一键登录
  • 地图选点的4种方式
  • 电商平台中的订单状态
  • 什么是RFM值?
  • 网络异常设计
  • 安装Superset到Mac电脑
  • 一种简单的同比算法
  • 什么是复购率以及如何计算复购率?
  • 什么是续费率以及如何计算续费率?
  • Tooltip
  • Overflow - 用户流程/交互流程工具
  • 365天搞定英文原版阅读
  • 参考书籍、资源
Powered by GitBook
On this page
  • 安装时间
  • 安装Superset - 安装进Python虚拟机
  • 运行
  • 参考

Was this helpful?

安装Superset到Mac电脑

Previous网络异常设计Next一种简单的同比算法

Last updated 5 years ago

Was this helpful?

安装时间

大约需要1-2小时。

安装Superset - 安装进Python虚拟机

提供3种安装方式:1)安装进Docker 2)直接安装进操作系统 3)安装进Python虚拟机。第1种方式来自社区志愿者,没有项目核心人员在维护这种发式,安装过程中可能会有些问题,本人就通过docker死活装不上;第2种方式不推荐,因为Superset会依赖很多包,直接装进操作系统可能会和其他应用冲突;所以推荐使用Python虚拟机进行安装。以下是安装步骤。

安装Python3.6

因为Superset需要运行在Python3.6及以上版本里,所以需要首先运行:

python3 --version

确认你是否有Python3.6及以上版本,如果没有可以去官网下载并安装最新版。

安装Python虚拟机visualenv

pip install virtualenv

创建和激活virtualenv:

# virtualenv is shipped in Python 3.6+ as venv instead of pyvenv.
# See https://docs.python.org/3.6/library/venv.html
python3 -m venv venv
. venv/bin/activate

一旦激活后你的所有操作都在Python虚拟机里面,要退出的话输入deactivate。

Python的配置工具和pip

pip install --upgrade setuptools pip

Superset的安装和初始化

# Install superset
pip install superset

# Create an admin user (you will be prompted to set a username, first and last name before setting a password)
fabmanager create-admin --app superset

# Initialize the database
superset db upgrade

# Load some data to play with
superset load_examples

# Create default roles and permissions
superset init

# To start a development web server on port 8088, use -p to bind to another port
superset runserver -d

问题

在Superset的安装和初始化中可能会遇到的2个问题。

问题1:

Was unable to import superset Error: cannot import name '_maybe_box_datetimelike' from 'pandas.core.common' (/usr/bin/venv/lib/python3.7/site-packages/pandas/core/common.py)
pip uninstall pandas
pip list | grep pandas
pip install pandas==0.23.4

问题2:

sqlalchemy.exc.InvalidRequestError: Can't determine which FROM clause to join from, there are multiple FROMS which can join to this entity. Try adding an explicit ON clause to help resolve the ambiguity.
pip install sqlalchemy==1.2.18

运行

. venv/bin/activate
superset runserver -d

参考

打开就可以查看你的Superset。

解决方法:跟pandas版本有关,卸载掉重装低版本,参考来源:

解决方法:安装sqlalchemy 1.2.18,参考来源:

当你不小心关闭终端,或中断了进程 ,你会发现会打不开。这时候就需要重新激活虚拟机,并运行superset就可以了。

Superset
Python
http://localhost:8088
https://github.com/apache/incubator-superset/issues/6770。
https://github.com/apache/incubator-superset/issues/6977。
http://localhost:8088
Apache Superset Installation & Configuration
superset可视化clickhouse安装教程
可能是目前颜值最高的开源BI工具-Superset
Superset 分析示例数据