superset icon indicating copy to clipboard operation
superset copied to clipboard

Exception: Unable to execute 'ecpg', you likely need to install it.'

Open Habeeb556 opened this issue 1 year ago • 1 comments

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

image

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.

Habeeb556 avatar Jun 28 '24 20:06 Habeeb556

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.

dosubot[bot] avatar Jun 28 '24 20:06 dosubot[bot]

Thanks, the issue was resolved after installing pgdg-redhat-repo-latest.noarch.rpm and then installing the package.

sudo yum install postgresql-devel

Habeeb556 avatar Jun 29 '24 21:06 Habeeb556

On debian (and ubuntu):

sudo apt install libecpg-dev

and then verify with: which ecpg

/usr/bin/ecpg

scriptmaster avatar Aug 17 '24 12:08 scriptmaster