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 |
Update and upgrade your system:
sudo apt update
sudo apt upgrade
Install Required Packages
For
Ubuntu 22.04and 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
Check the supported python version for apache superset
python version is supported for apache superset apache superset package


python3.10Python 3.10Let's check the existing version of python in the system
python3 --version

The screenshot suggest the system has
python 3.12.3installed, which is not supported for installation ofapache supersetas of 2025-04-26
Installing python 3.10
Run the following command one by one to install python 3.10, the dev version and virtual environment
sudo 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
Create a folder named app, and navigate to the folder:
mkdir app && cd app
Generate virtual environment using correct python venv env inside the folder:
python3.10 -m venv env
Make sure to use python3.10 to ensure compatibility with the installed Python version.
Activate the virtual environment env:
source env/bin/activate
or
. env/bin/activate
Update your pip setuptools wheel and pillow (package installer for Python):
pip install --upgrade pip setuptools wheel pillow
Install Apache Superset using pip:
pip install apache-superset
Generate a strong key required for running Apache Superset (keep this key secure):
openssl rand -base64 42
Store this
keysecurely and do not expose it publicly.
Then, define mandatory configurations, 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
Create and upgrade the Apache Superset database:
superset db upgrade

If you get error stating
unexpected keyword 'min_length, then run the following command
pip show marshmallow

So the
marshmallowis 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 again
superset db upgrade
Create an admin user for Superset:
superset fab create-admin
Load the default example databases of Apache Superset:
superset load-examples
Initialize Apache Superset:
superset init
Run the Apache Superset application:
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:
Install the micro text editor for editing the activation script inside the virtual environment
sudo apt update
sudo apt install micro

Locate the Activation Script, which should be inside
[virtual Environment]/bin/activate
Edit the Activation Script:
sudo nano env/bin/activate
or
micro env/bin/activate
Generate the SECRET-KEY again
openssl rand -base64 42
Add the Export Command at the bottom of the script
export FLASK_APP=superset
export SUPERSET_SECRET_KEY=YOUR-SECRET-KEY
These line will automatically set the
FLASK_APPenvironment variable every time you activate your virtual environment.
Test the Configuration:
deactivate
source env/bin/activate
echo $FLASK_APP
echo $SUPERSET_SECRET_KEY
It should output superset.

Just created a new Git branch and see 500+ modified files? Uncover the GitHub Desktop on Windows trap and resolve annoying line ending & permission errors step-by-step.

Stuck with SQLite errors in Superset? Learn why your metadata DB is locked and how to fix it permanently by migrating to PostgreSQL.

Learn why the Frappe framework's built-in reporting is a game-changer. See how to customize, group, and save reports instantly