Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Psycopg2 not found #46

Open
asis5d opened this issue Jan 17, 2024 · 0 comments
Open

Psycopg2 not found #46

asis5d opened this issue Jan 17, 2024 · 0 comments

Comments

@asis5d
Copy link

asis5d commented Jan 17, 2024

I can see the documentation mentions pg8000 as one of the requirements for this package to run. But following the basic steps from the documentation, I run into the error that says: ModuleNotFoundError: No module named 'psycopg2'.
As I dug into it, in the snippet:

engine = create_engine(postgresql.url())

the url() method looks like this:

def url(self, **kwargs):
        params = self.dsn(**kwargs)

        url = ('postgresql://%s@%s:%d/%s' %
               (params['user'], params['host'], params['port'], params['database']))

        return url

And since the url doesn't explicitly mention the pg8000 driver, I am getting the error. Is there any workaround for this if I don't want to install psycopg2?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant