参考:1.http://blog.csdn.net/u014729236/article/details/76302888?locationNum=2&fps=1
2.https://www.cnblogs.com/crazytao/p/7827905.html
我的版本:
1 yum upgrade python-setuptools 2 yum install gcc gcc-c++ libffi-devel python-devel python-pip python-wheel openssl-devel libsasl2-devel openldap-devel
1 yum groupinstall "Development tools" 2 yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel 3 mv /usr/bin/python /usr/bin/python.bak 4 wget https://www.python.org/ftp/python/3.6.3/Python-3.6.3.tgz 5 tar -zxvf Python-3.6.3.tgz 6 cd Python-3.6.3 7 ./configure --prefix=/usr/local/python/python3 8 make && make altinstall 9 echo "/usr/local/python/python3/lib" >> /etc/ld.so.conf 10 ldconfig 11 ln -s /usr/local/python/python3/bin/python3.6 /usr/bin/python 12 ln -s /usr/local/python3/bin/pip3 /usr/bin/pip 13 python -V
pip install virtualenv
1 virtualenv superset 2 source ./bin/activate
deactivate
1 pip install --upgrade setuptools pip
1 pip install mysqlclient
SUPERSET_WEBSERVER_PORT = 9006
SQLALCHEMY_DATABASE_URI = 'mysql://webdb:Webdb123$@cdh-1:3306/superset?charset=utf8'
BABEL_DEFAULT_LOCALE = 'zh'
CACHE_DEFAULT_TIMEOUT = 60 * 60
PUBLIC_ROLE_LIKE_GAMMA = True
LANGUAGES = {
'en': {'flag': 'us', 'name': 'English'},
#'it': {'flag': 'it', 'name': 'Italian'},
#'fr': {'flag': 'fr', 'name': 'French'},
'zh': {'flag': 'cn', 'name': 'Chinese'},
#'ja': {'flag': 'jp', 'name': 'Japanese'},
#'de': {'flag': 'de', 'name': 'German'},
#'pt': {'flag': 'pt', 'name': 'Portuguese'},
#'pt_BR': {'flag': 'br', 'name': 'Brazilian Portuguese'},
#'ru': {'flag': 'ru', 'name': 'Russian'},
}
APP_ICON = '/static/assets/imagesanxi-logo.jpg'
1 pip install -i https://pypi.tuna.tsinghua.edu.cn/simple superset==999999
1 pip install -i https://pypi.tuna.tsinghua.edu.cn/simple superset==0.23.2 2 #如果不指定镜像,直接输入下面的即可: 3 pip install superset==0.23.2
1 pip uninstall superset
1 vim /opt/superset/lib/python3.6/site-packages/superset/config.py
1 Username [admin]: sbs 2 User first name [admin]: s 3 User last name [user]: bs 4 Email [admin@fab.org]: sbsl@digidite.com 5 Password: Digidite123 6 Repeat for confirmation: Digidite123
1 uperset runserver
1 superset runserver -p 9006 &
1 superset db upgrade