Installing Apache Superset on Ubuntu 22.04 in July 2022
Apache superset has some fragile libraries. It took a while for me to install it on my computer. This is the documentation
It is python3.10 in Ubuntu 22.04. But, numpy doesn’t support that version. And superset needs numpy.
So, we have to first install a lower python version. Superset uses some python3.8 features, which means a minimum of 3.8 is required.
Different python versions can be obtained from deadsnake’s ppa
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
Now, we have to install a few python stuff
sudo apt install python3.8 python3.8-dev python3.8-venv
sudo apt install build-essential
The -dev library is required for python-geohash
which is a dependency.
Now we can start installation.
python3.8 -m venv venv
source venv/bin/activate
pip install apache-superset==1.5.1
The markupsafe version is broken. We have to downgrade it.
pip install markupsafe==2.0.1
Now proceed with superset initializations
export FLASK_APP=superset
superset fab create-admin
superset db upgrade
superset load_examples
superset init
Finally you can run it
superset run -p 8088 -h 0.0.0.0 --with-threads --reload --debugger
Windows
If you are a Windows user you are better off installing Linux.
If that’s not possible you can use VirtualBox and install Linux inside that.
If even that’s not possible, docker desktop with WSL might be an option for you.
If you want to try installing from scratch, make sure that you have “Build Tools for Visual Studio 2022” installed from (scroll down on that page. It is not visual studio code)
Update: Superset 2
A couple of days after this blog post was written, apache-superset 2.0.0 became available on pypi.
You can do almost the same steps for 2.0.0 too, but instead of doing
pip install apache-superset==1.5.1
you’ll have to do
pip install apache-superset
And, there is a dependency issue too which can be fixed with
pip install werkzeug==2.0.3