源码部署 http://airbnb.io/superset/installation.html
- 安装Python环境依赖
-
sudo yum upgrade python-setuptools
sudo yum install gcc libffi-devel python-devel python-pip python-wheel openssl-devel libsasl2-devel openldap-devel
-
- 安装虚拟化环境
- 安装Python3.4
- pip install virtualenv --no-site-packages -p python3.4 env_name
- source env_name/bin/activate
-
MACOS LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" pip install cryptography==1.5.3
- 安装Caravel模块
- 安装用豆瓣源 http://www.tuicool.com/articles/6zMNb2 pip(pip install)和easy_install(python install)两种都设置
- 到 setup.py目录 python setup.py install
- mysql metadata
-
pip install mysqlclient -i https://pypi.douban.com/simple
-
-
assests部署
-
sh superset/assets/js_build.js
-
npm 安装淘宝镜像
-
Mysql latin1问题
数据源连接加charset=utf8
问题汇总
- Mysql latin1问题数据源
连接加charset=utf8 - sql_lab生成的表
- (_mysql_exceptions.OperationalError) (1305, 'FUNCTION superset.count_distinct does not exist')
修改 SQL Expression count(distinct id) - exception :'NoneType' object has no attribute 'sqla_col'
加默认一个Metric = count 的 ListSqlMetric
- (_mysql_exceptions.OperationalError) (1305, 'FUNCTION superset.count_distinct does not exist')
- 汉化
- superset/config.py
BABEL_DEFAULT_LOCALE = 'zh'
LANGUAGES = {
# 'en': {'flag': 'us', 'name': 'English'},
# 'fr': {'flag': 'fr', 'name': 'French'},
'zh': {'flag': 'cn', 'name': 'Chinese'},
} -
http://blog.youkuaiyun.com/lichengtongxiazai/article/details/22270561
编译成mo文件
pybabel compile -d translations
- superset/config.py
服务器上源码安装
- 本地 python setup.py sdist
2. scp sdist/superset.tar.gz
3. tar -zxvf superset.tar.gz
4. python setup.py install
5. superset runserver -d -p 8089
本地debug模式
在入口 --init.py–最后加上
app.run(port=8089,debug=True)