pgdb 导入错误(_pd.pyd 文件未创建)

pgdb import error (_pd.pyd file not created)

面临与 相同的问题,但在这种情况下,我可以看到 _pg.pyd 文件未在虚拟环境的站点包中创建。

import pg
  File "c:\users\pmlp\.virtualenvs\qc-scheduling-nfxvviij\lib\site-packages\pgdb.py", line 68, in <module>
from _pg import *
ImportError: DLL load failed: The specified module could not be found.

知道如何创建它或为什么没有创建它吗?

我发现我只需要将 postgree 路径添加到用户路径:

set PATH=C:\Program Files\PostgreSQL\bin;%PATH%