加载 psycopg2 模块时出错:导入 _psycopg 时 DLL 加载失败:找不到指定的模块

Har*_*mar 1 python django

raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e) django.core.exceptions.ImproperlyConfigured: Error loading psycopg2 module: DLL load failed while importing _psycopg: The specified module could not be found.

我已经安装了 letest postgres 安装程序

已安装 psycopg2

在此输入图像描述

Har*_*mar 6

我只是通过安装第二个最新的 python 版本并安装 PostgreSQL 来解决这个错误,使用pip install postgres这将安装 psycopg2 和 psycopg2-binary