参考:http://superset.apache.org/installation.html#getting-started
1.环境装备
为superset准备独立的python环境。superset不支持python2
python3在centos中的部署请看相关教材。
virtualenv --python=/usr/local/python3/bin/python3.6 env-superset
source bin/activate env-superset
2.安装superset
pip install superset -i https://pypi.douban.com/simple
除了douban源头 还有阿里源 https://mirrors.aliyun.com/pypi/simple/
网络不好一定会timeout的
3.部分系统需要补充安装gcc
否则会报错:error: command 'gcc' failed with exit status 1
yum install gcc-c++
重新执行步骤2
安装过程中出了很多包依赖关系的错误。
sudo yum install gcc libffi-devel python-devel python-pip python-wheel openssl-devel libsasl2-devel openldap-devel
如上包安装后,superset顺利安装
4.执行过程中依然报错
其中pandas与flask应该有版本的问题,其中将pandas==0.23.4 flask==1.0 sqlalchemy==1.2.18
执行如下命令
# Initialize the database
superset db upgrade
# Create an admin user (you will be prompted to set a username, first and last name before setting a password)
$ export FLASK_APP=superset
flask fab create-admin
# 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 run 需指定IP地址 -p 8080 --with-threads --reload --debugger
忘了可以superset run --help