Ubuntu16.04安裝Superset

Superset 是Airbnb 開源的大數據可視化平臺html

其支持的datasourcepython

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

相似的開源項目Zeppelin所支持的datasourcemysql

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 supportedsql

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.安裝虛擬環境apache

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

4.安裝supersetvim

pip install --upgrade setuptools pip
pip install superset

 以後按照官方文檔的安裝方法來,遇到bash

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

解決方法大數據

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

執行superset db upgrade時,若是遇到ui

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

以後參照官方文檔進行安裝和啓動就能夠了

 

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
相關文章
相關標籤/搜索