Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache Superset, Ubuntu, from scratch - superset-frontend directory does not created

Trying to install Apache Superset "from Scratch" according to official instructions: "https://superset.apache.org/docs/installation/installing-superset-from-scratch/" on Ubuntu 22.04 OS:

Оn first step, "OS Dependencies", Python3.10 was installed.

  1. "Then, you need to initialize the database: superset db upgrade"
  • this command had many errors, but, after execution: a) "pip install sqlparse=='0.4.3'" (advice from "https://github.com/apache/superset/issues/23742") b) "export FLASK_APP=superset" (reference to this variable was required in error message) db was upgraded without errors.
  1. "# Build javascript assets cd superset-frontend npm ci npm run build cd .. "
  • directory "superset-frontend" does not exist in the whole system as well as no such record in pip or apt repositories (and I do not see any errors in command execution prints on previous steps).

I do not know what I can do in this case (afraid all that are "by design")... Can somebody help? Is it possible to install Apache Superset "from Scratch" on Ubuntu 22.04? What exact sequence of commands needed for that?

like image 519
Johnny Littlepunch Avatar asked Sep 18 '25 21:09

Johnny Littlepunch


2 Answers

As I could figured it out, you don't need to go to directory superset-frontend and compile assets in case of Python Virtual Environment.

Take a look at this part of docs (you could see no reference for superset-frontend and actions with it): https://apache-superset.readthedocs.io/en/latest/installation.html#superset-installation-and-initialization

My exact commands to start Superset from scratch with Python Virtual Enviroment:

mkdir superset

cd superset/

python3 -m venv venv

. venv/bin/activate

# to update pip from 22.01 with bugs
pip install --upgrade pip

# my metadata database for Superset is Postgres12 so I need to install python lib for connecting to PG
pip install psycopg2

# to resolve warnings about missing PIL installation
pip install pillow

#here you need to a create superset_config.py with own SecretKey string as it described in https://superset.apache.org/docs/installation/configuring-superset/#configuration
#my metadata database for Superset is Postgres12
#SQLALCHEMY_DATABASE_URI = 'postgresql://superset_db_owner:[password_for_owner]@[hostname]:5432/superset'

#connect from postgres superadmin and run these statements row by row in a IDE query window (dbeaver or etc)
#CREATE ROLE superset_db_owner WITH NOCREATEDB CREATEROLE;
#ALTER ROLE superset_db_owner WITH PASSWORD 'password_for_owner' LOGIN;
#create database superset with OWNER = "superset_db_owner";
#create schema "primary" AUTHORIZATION "superset_db_owner";
#ALTER DATABASE superset SET SEARCH_PATH TO "primary", public;

#master superset_config.py is located in a directory above and I just copy it to my folder
cp ../superset_config.py .

export SUPERSET_CONFIG_PATH=/home/lightshade/pyenv/superset/superset_config.py

export FLASK_APP=superset

superset db upgrade

superset fab create-admin

superset load_examples

superset init

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

go to http://localhost:8088/login/

As a result you should see that screen: enter image description here

like image 51
aestet Avatar answered Sep 23 '25 06:09

aestet


Apache SupersetV4.0.2 on Ubuntu 24 LTS: I had challenges with dependencies versions for Python3.12(pkgutil and numpy) and Python3.9(python-geohash and psycopg2).
It all worked outh, with Python3.10, updates to pip and libraries. Thanks to author of below link, which was very helpful.

like image 20
user2984447 Avatar answered Sep 23 '25 06:09

user2984447



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!