Install Apache Superset on Ubuntu without docker

How to Install Ubuntu on Windows Using WSL
Follow this blogpost to install Ubuntu
on Windows
using WSL (Windows Subsystem for Linux)
We will use these command over the whole blogpost, if you arere new in this blogpost you should skip this section, and if you are already familiar with the setup process, then you can use this section.
Package | Command |
---|---|
Install required package | sudo apt-get install micro build-essential libssl-dev libffi-dev python3-dev python3-pip libsasl2-dev libldap2-dev default-libmysqlclient-dev |
venv | sudo apt install python3.10-venv |
python3.10-dev | sudo apt-get install python3.10-dev |
pip | pip install --upgrade pip setuptools wheel pillow marshmallow==3.20.1 |
sudo apt update
sudo apt upgrade
For
Ubuntu 22.04
and later versions
sudo apt-get install build-essential libssl-dev libffi-dev libsasl2-dev libldap2-dev default-libmysqlclient-dev
For
Ubuntu 20.04
sudo apt-get install build-essential libssl-dev libffi-dev libsasl2-dev libldap2-dev default-libmysqlclient-dev
apache superset
python
version is supported for apache superset
apache superset package
python3.10
Python 3.10
python3 --version
The screenshot suggest the system has
python 3.12.3
installed, which is not supported for installation ofapache superset
as of 2025-04-26
python 3.10
Run the following command one by one to install python 3.10
, the dev version and virtual environmentsudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.10 python3.10-dev python3.10-venv
app
, and navigate to the folder:mkdir app && cd app
env
inside the folder:python3.10 -m venv env
Make sure to use python3.10
to ensure compatibility with the installed Python version
. env
:source env/bin/activate
or. env/bin/activate
pip
setuptools
wheel
and pillow
(package installer for Python):pip install --upgrade pip setuptools wheel pillow
pip
:pip install apache-superset
openssl rand -base64 42
Then, define mandatory configurations,Store this
key
securely and do not expose it publicly.
SECRET_KEY
and FLASK_APP
(consider adding this to your .bashrc
or .profile
to make it permanent):export SUPERSET_SECRET_KEY=YOUR-SECRET-KEY
export FLASK_APP=superset
If you shutdown your system, you need to follow this step again. TO PERSIST THE CONFIGURATION, SCROLL AT THE BOTTOM OF THE BLOGPOST
superset db upgrade
If you get error stating
unexpected keyword 'min_length
, then run the following command
pip show marshmallow
So the
marshmallow
is installed, but the current version is not supported, let's downgrade it to3.20.1
pip install marshmallow==3.20.1
Finally run the superset db upgrade
command againsuperset db upgrade
superset fab create-admin
superset load-examples
superset init
superset run
Ensure that your firewall and port settings allow you to access the Superset web interface.If you encounter any issues during the installation, consider checking for:
This guide aims to help you smoothly set up Apache Superset on an Ubuntu system using Python 3.10. Happy data exploring!
To avoid having to export the FLASK_APP
environment variable every time you activate your virtual environment and run Apache-Superset
, you can make this setting persistent by adding it to your virtual environment's activation script. Here’s how you can do that:
micro
text editor for editing the activation script inside the virtual environmentsudo apt update
sudo apt install micro
[virtual Environment]/bin/activate
sudo nano env/bin/activate
ormicro env/bin/activate
SECRET-KEY
againopenssl rand -base64 42
Add the Export Command at the bottom of the scriptexport FLASK_APP=superset
export SUPERSET_SECRET_KEY=YOUR-SECRET-KEY
These line will automatically set the
FLASK_APP
environment variable every time you activate your virtual environment.
deactivate
source env/bin/activate
echo $FLASK_APP
echo $SUPERSET_SECRET_KEY
It should output superset.