Install Superset and Airflow with Conda

Conda is a package manager that featuring pre-compiled binary package (in contrast with PyPi, which may be compiled from source). As a strategy, we setup the virtual env in Conda first, and fallback to pip if the package is not available in Conda.

Superset

Setup the base system for required dependencies


sudo apt-get install build-essential libssl-dev libffi-dev python3-dev python3-pip libsasl2-dev libldap2-dev default-libmysqlclient-dev

Create a Virtual Env and switch to the env


conda create -n superset python=3.10
conda activate superset
conda install pillow psycopg2
pip install apache-superset

export env variable


export FLASK_APP=superset
export SUPERSET_SECRET_KEY="some_random_base64_string"

Follow the official document for initialization


superset db upgrade
superset fab create-admin
superset load_examples
superset init

Start the App with the following command

superset run -p 8088 --with-threads --reload --debugger