安装python
运行 python --version 或 python2 --version。如果出现版本则表示以安装
安装支持
运行 yum install gcc gcc-c++ libffi-devel python-devel python-pip python-wheel openssl-devel libsasl2-devel openldap-devel python-setuptools python-virtualenv -y 安装所有支持及软件
安装virtualenv(可选)
pip install virtualenv
# virtualenv is shipped in Python 3 as pyvenv
virtualenv venv
. ./venv/bin/activate
(关闭deactivate)
更新pip和setuptools
pip install --upgrade setuptools pip
安装superset
# Install superset
pip install superset
# Create an admin user (you will be prompted to set username, first and last name before setting a password)
fabmanager create-admin --app superset
# Initialize the database
superset db upgrade
# 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 runserver -d
然后就可以在http://localhost:8088页面查看了
问题
问题一
Found existing installation: PyYAML 3.10
Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
方法
pip install docker-py --ignore-installed PyYAML
问题二
Traceback (most recent call last):
File "/home/derwin/venvbeta/bin/superset", line 12, in
from superset.cli import manager
File "/home/derwin/venvbeta/local/lib/python2.7/site-packages/superset/init.py", line 89, in
db = SQLA(app)
File "/home/derwin/venvbeta/local/lib/python2.7/site-packages/flask_sqlalchemy/init.py", line 677, in init
self.Model = self.make_declarative_base(model_class, metadata)
TypeError: make_declarative_base() takes at most 2 arguments (3 given)
方法
pip uninstall flask-sqlalchemy
pip install flask-sqlalchemy==2.1
superset db upgrade
问题三
importerror: cannot import name encryptedtype
方法
查询资料发现要求 SQLAlchemy-Utils <0.33,使用pip show SQLAlchemy-Utils发现版本为0.33.2 使用pip install SQLAlchemy-Utils == 0.32.0