Skip to content

Psycopg2 not foundΒ #46

@asis5d

Description

@asis5d

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions