Exception: Unable to execute 'ecpg', you likely need to install it.'
Bug description
I got the below error in log:
Exception: Unable to execute 'ecpg', you likely need to install it.'
How to reproduce the bug
When using postgresql v13.3
Screenshots/recordings
Superset version
4.0.1
Python version
3.11
Node version
I don't know
Browser
Chrome
Additional context
No response
Checklist
- [X] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [X] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
To resolve the error "Exception: Unable to execute 'ecpg', you likely need to install it" when using PostgreSQL in Superset 4.0.1 with Python 3.11, you need to install the ecpg package. This package is part of the PostgreSQL development libraries.
You can install it using the following command:
sudo apt-get install postgresql-client-common
Or, if you are using a different package manager, you can find the equivalent package for your system. For example, on a Red Hat-based system, you might use:
sudo yum install postgresql-devel
This should resolve the error by ensuring that the ecpg executable is available on your system [1].
To continue talking to Dosu, mention @dosu.
Thanks, the issue was resolved after installing pgdg-redhat-repo-latest.noarch.rpm and then installing the package.
sudo yum install postgresql-devel
On debian (and ubuntu):
sudo apt install libecpg-dev
and then verify with:
which ecpg
/usr/bin/ecpg