目录
1.pyhont3.6以上版本安装(适配python3.8.7版本)
2.安装python依赖模块
sudo yum install gcc gcc-c++ libffi-devel python-devel python-pip python-wheel openssl-devel cyrus-sasl-devel openldap-devel
3.创建python虚拟环境
pip install virtualenv
python3 -m venv venv
. venv/bin/activate
4.安装和初始化superset
First, start by installing apache-superset:
pip install apache-superset
Then, you need to initialize the database:
superset db upgrade
Finish installing by running through the following commands:
Create an admin user (you will be prompted to set a username, first and last name before setting a password)
export FLASK_APP=superset
superset 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
nohup superset run -p 18088 -h 0.0.0.0 --with-threads --reload --debugger &
5.添加database连接
presto
presto://ip:port/hive
clickhouse
clickhouse://*** : ***@ip:port
6.问题解决:
连presto,clickhouse 会遇到连不上问题,需要执行以下命令:
pip uninstall infi.clickhouse_orm
pip install infi.clickhouse_orm==1.0.4
pip install sqlalchemy-clickhouse
pip install pyhive
sqlalchemy的版本要为1.3.16 否则可能会报错,连不上
pip install sqlalchemy==1.3.16