Page 1 of 1

Psycopg2 – ImportError: Das Laden der DLL ist beim Importieren fehlgeschlagen. _psycopg: Das angegebene Modul konnte nic

Posted: 03 Jan 2025, 11:11
by Guest
Ich habe versucht, psycopg2 unter dem Pycharm-Editor mit Python 3.13 und psycopg2-binary 2.9.10 zu installieren.
Ich habe diesen Fehler erhalten:

Code: Select all

Traceback (most recent call last):File "...\PycharmProjects\pythonProject\database.py",
line 1, in import psycopg2File "...\PycharmProjects\pythonProject\venv\Lib\site-
packages\psycopg2_init_.py", line 51, in from psycopg2._psycopg import (
# noqa......)ImportError: DLL load failed while importing _psycopg: The specified module could not be found.
Ich habe folgende Versuche versucht:
  • Code: Select all

    pip install --force-reinstall psycopg2-binary
  • Ich habe Microsoft Visual C++ Redistributable installiert
  • Ich habe Virtual Environment und die psycopg2-binary-Bibliothek neu erstellt
Warum tritt dieses Problem auf und wie kann es behoben werden?