You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
psycopg2-binary==2.9.6 incompatible with Python 3.12 docker image #37126
The apache/superset:6.0.0-py312 Docker image is published, but the optional PostgreSQL dependency in pyproject.toml pins psycopg2-binary==2.9.6, which has no pre-built wheels for Python 3.12.
How to Reproduce
FROM apache/superset:6.0.0-py312
RUN pip install 'psycopg2-binary==2.9.6'
Build fails with:
error: command 'gcc' failed: No such file or directory
Expected Behavior
Optional database extras should be installable on all published Python version images.
Suggested Fix
Update pyproject.toml:
postgres = ["psycopg2-binary>=2.9.9"] # 2.9.9+ has py312 wheels
You're correct: the postgres extra in Superset's pyproject.toml is pinned to psycopg2-binary==2.9.6, which does not have pre-built wheels for Python 3.12. This causes pip to attempt a source build, resulting in the gcc error you described in minimal Docker images (source).
This issue is widely reported by users running Superset on newer Python versions and containerized environments (discussion). The most robust workaround is to install psycopg2-binary>=2.9.9, which provides Python 3.12 wheels and avoids the need for build tools. However, as of now, the official Superset dependencies have not been updated to reflect this, and there is no official fix merged yet (PR reference).
If you need to proceed before an official update, you can override the dependency in your Dockerfile with:
RUN pip install 'psycopg2-binary>=2.9.9'
This should resolve the build failure on Python 3.12 images.
Activity
dosubot commentedon Jan 14, 2026
Hi @bimbolimbo! I'm Dosu and I’m helping the superset team.
You're correct: the postgres extra in Superset's pyproject.toml is pinned to psycopg2-binary==2.9.6, which does not have pre-built wheels for Python 3.12. This causes pip to attempt a source build, resulting in the gcc error you described in minimal Docker images (source).
This issue is widely reported by users running Superset on newer Python versions and containerized environments (discussion). The most robust workaround is to install psycopg2-binary>=2.9.9, which provides Python 3.12 wheels and avoids the need for build tools. However, as of now, the official Superset dependencies have not been updated to reflect this, and there is no official fix merged yet (PR reference).
If you need to proceed before an official update, you can override the dependency in your Dockerfile with:
This should resolve the build failure on Python 3.12 images.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
rusackas commentedon Jan 27, 2026
PR welcome if the suggested fix does indeed fix it!