Skip to content

Python 3.8: ImportError: DLL load failed while importing _psycopg: The specified module could not be found. #1006

@juliavdkris

Description

@juliavdkris

TL; DR: update pip. See this comment

I get this error when trying to import psycopg2 in Python 3.8 on Windows 10. I already tried reinstalling (both psycopg2 and psycopg2-binary) and even reinstalling Postgres. Seems to work fine on Python 3.7.

>>> import psycopg2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\Documents\Programming\blokken\.venv\lib\site-packages\psycopg2\__init__.py", line 50, in <module>
    from psycopg2._psycopg import (                     # noqa
ImportError: DLL load failed while importing _psycopg: The specified module could not be found.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions