How to Install Apache-Superset 2.0.1 using python 3.9 in ubuntu 22.04

Gembit Soultan Shirazi
2 min readJan 29, 2023

--

Hi All, Today I am going to write about my experience when I installed apache-superset 2.0.1 in ubuntu 22.04 using python3.9.

As you may know the default python version ubuntu in 22.04 is python 3.10 and currently the apache superset only support python 3.8 and python 3.9 version.

Okay lets start. Probably some of you think it is really easy on installing the superset just follow the instruction on the documentation below, then boom its work.

https://superset.apache.org/docs/installation/installing-superset-from-scratch

but the reality, when I tried to follow the instruction, it is not a smooth as I think, especially if you don’t have a basic understanding of python language, it is not easy. believe me.

So this is the instruction that I do to Installed smoothly.

  1. Install python 3.9, you can use deadsnake repository.
sudo apt update
sudo apt software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.9*

2. Create python3.9 virtual environment. but make sure python3.9-venv is already installed. on this example, I am going to use the /opt

cd /opt
python3.9 -m venv venv
. venv/bin/activate

3. then installed apache-superset, using pip

pip install apache-superset

4. Dont forget to export the flask app as superset.

export FLASK_APP=superset

Since the default WTForms in python3.9 are using WtForms > 3. You need to downgrade the WTForms to 2.3.3 version

pip install WTForms==2.3.3

Then you can run the superset db upgrade command.

superset db upgrade

if you have an error, like this. This is because on the latest version of cryptography module remove the openssl x509.

No module named cryptography.hazmat.backends.openssl.x509

Set your cryptography to 38.0.4. then run superset db upgrade again.

pip install cryptography==38.0.4

to run superset server for development on port 8088, type the below code :

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

--

--

Gembit Soultan Shirazi

VP Of Technology - Impack Pratama, Head Of Tech Urbanhire.com, Founder of Foodina.id, CoFounder of Pasarpolis.com, Geeks, CTO, Consultant and Lecturer