Ubuntu16.04安装Superset

Superset 是Airbnb 开源的大数据可视化平台

其支持的datasource

https://superset.incubator.apache.org/index.html?highlight=datasource

类似的开源项目Zeppelin所支持的datasource

https://zeppelin.apache.org/docs/0.8.0/quickstart/sql_with_zeppelin.html

 

1.升级python3.5到python3.6,否则会报 ERROR: Sorry, Python < 3.6 is not supported

sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt update
sudo apt install python3.6 

2.官方的安装文档

https://superset.incubator.apache.org/installation.html

3.安装虚拟环境

sudo apt-get install python3.6-venv
python3.6 -m venv venv
. venv/bin/activate

4.安装superset

pip install --upgrade setuptools pip
pip install superset

 之后按照官方文档的安装方法来,遇到

Running setup.py install for python-geohash ... error

解决方法

sudo apt-get install python3.6-dev libsasl2-dev gcc

执行superset db upgrade时,如果遇到

ImportError: cannot import name '_maybe_box_datetimelike'

是pandas版本过高导致的,进行降级

pip list | grep pandas
pandas                 0.24.2
pip install pandas==0.23.4

如果遇到

ImportError: cannot import name '_maybe_box_datetimelike'

是SQLAlchemy版本过高导致的

pip install SQLAlchemy==1.2

之后参照官方文档进行安装和启动就可以了

Ubuntu16.04安装Superset_第1张图片

 

superset默认使用的数据库是sqlite,将其修改成mysql的方式为编辑 vim config.py,改为

SQLALCHEMY_DATABASE_URI = 'mysql://superset:superset@localhost/superset?charset=UTF8'  

 创建mysql用户

mysql> CREATE DATABASE superset
    ->   DEFAULT CHARACTER SET utf8
    ->   DEFAULT COLLATE utf8_general_ci;
Query OK, 1 row affected (0.00 sec)

mysql> CREATE USER 'superset';
Query OK, 0 rows affected (0.01 sec)

mysql> SET PASSWORD FOR 'superset' = PASSWORD('superset');
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL ON superset.* TO 'superset';
Query OK, 0 rows affected (0.00 sec)

 再执行

superset db upgrade

 

转载于:https://www.cnblogs.com/tonglin0325/p/11189979.html

你可能感兴趣的:(Ubuntu16.04安装Superset)