Issue in psycopg2 while upgrading from 4.x to 5.0 #34109
-
I am trying to upgrade superset using helm from
As you can see at the first line of the log I've attached, It mentions that psycopg2 was installed successfully. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 9 replies
-
This error happens because Superset 5.0.0 Docker/Helm images are now "lean" and do not include database drivers like psycopg2-binary by default. Also, Superset v5 switched from pip to uv as the Python package manager, so installing with pip may not actually install the driver in the environment Superset uses ref ref. To fix this, update your Helm chart's bootstrapScript to install psycopg2-binary using uv inside the Superset virtual environment. For example: bootstrapScript: |
#!/bin/bash
apt update && apt install -y gcc libpq-dev python3-dev pkg-config
/app/.venv/bin/uv pip install psycopg2-binary This ensures psycopg2 is available where Superset expects it. You can verify the install by running These steps are required for all production/lean images starting from Superset 4.1.x and above, not just 5.0.0 ref ref. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
-
I noticed you mentioned upgrading to Superset 5.0.0 using Helm, but I don’t see version 5.0.0 available in the official Superset Helm Could you please clarify which Helm repository or chart you are using for Superset 5.0.0? Thanks in advance for your help! |
Beta Was this translation helpful? Give feedback.
-
I need help @dosu... I'm trying to deploy locally superset 5.0.0 from superset-helm-chart-0.15.1. I'm using minikube locally to simulate the eks production environment. This is my Chart.yaml content
and following your advise this is my bootstrapScript
buy i'm still having a Here the log from one of the pods that tries to run de init-job
|
Beta Was this translation helpful? Give feedback.
The reason
/app/.venv/bin/uv
isn't found is that in Superset 5.0.0,uv
is installed system-wide, not inside the virtual environment. You should just calluv
directly, not with a path. So your bootstrapScript should look like:This change happened after 4.1.x—Superset 5.0.0 and above use
uv
instead ofpip
for Python package management, anduv
is available on the system path, not in.venv
citation citation. That…