安装环境:Centos 7
Python3.5
安装Pythoy依赖编译环境
yum install gcc gcc-c++
yum install openssl-develbzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel
Python3.5安装
wget https://www.python.org/ftp/python/3.5.0/Python-3.5.0.tgz --no-check-certificate
tar zxvf Python-3.5.0.tgz
cd Python-3.5.0
./configure
make & make install
cd ..
注意安装时不要修改原软链接 /usr/bin/python 不然会导致原yum命令不可用如果出现该问题参考
https://blog.csdn.net/huanyingfengxing/article/details/79834960 解决。
安装python-setuptools
wget https://pypi.python.org/packages/source/s/setuptools/setuptools-18.2.tar.gz --no-check-certificate
tar zxvf setuptools-18.2.tar.gz
cd setuptools-18.2
python3 setup.py build
python3 setup.py install
cd ..
安装pip
wget https://pypi.python.org/packages/source/p/pip/pip-7.1.2.tar.gz --no-check-certificate
tar -xzvf pip-7.1.2.tar.gz
cd pip-7.1.2
python3 setup.py install
cd ..
更新到合理版本
##这步可跳过
pip install–upgrade setuptools
python3 -mpip install --upgrade pip
安装虚拟环境
pipinstall -i http://mirrors.aliyun.com/pypi/simple/ virtualenv --trusted-hostmirrors.aliyun.com
# 创建虚拟环境
切换用户
su – copher
virtualenv venv
. ./venv/bin/activate
安装superset
# Install superset
使用阿里云源安装:
pip install -i http://mirrors.aliyun.com/pypi/simple/ superset --trusted-host mirrors.aliyun.com
等待安装完成
fabmanager create-admin --app superset
##回车,到输入密码时,输入密码
# 初始化数据库
superset dbupgrade
#导入实例数据
superset load_examples
# 创建角色和权限
superset init
# 启动服务默认端口 8088,使用 -p 绑定指定端口
superset run server
# To start a development web server, use the -d switch
# superset runserver -d
访问
http://ip:8088
安装MySQL支持组件
pip installpymysql
pip installmysqlclient
windows下遇到报错:
修改superset\utils.py
关于二次开发环境的部署
还需要安装nodejs,PyCharm;
从GitHub上下superset: https://github.com/apache/incubator-superset.git
# cd superset /assets# npm install# npm run prod
安装python各组件
配置运行环境在菜单中找到Run-->Edit Configurations..找开对话框Script: superset/bin/supersetScript parameters: runserver -p 8888
https://github.com/apache/incubator-superset.git