2017-01-02 158 views
0

我想在我的电脑上使用pip安装PyGreSQL模块。它显示了此消息: Collecting pygresql Using cached PyGreSQL-5.0.3-cp35-cp35m-win_amd64.whl Installing collected packages: pygresql Successfully installed pygresql-5.0.3 但是当我尝试将其导入第二天消息是这Python:安装pygresql

>>> import pygresql 
    Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
    ImportError: No module named 'pygresql' 
>>> from pygresql import _pg 
    Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
    ImportError: No module named 'pygresql' 

回答

0

其根据在其网站上的文档pgfrom pg import DB

+0

'>>>从PG进口分贝 回溯(最近通话最后一个): 文件 “”,1号线,在 g.py” 32行,在 从_pg import * ImportError:DLL加载失败:找不到指定的模块' – sleepcoffeedelight

+0

特定于个案:'DB'。 –

+0

是的,也试过了,它不工作,它说它不能识别模块pygresql – sleepcoffeedelight

0

看完这个link后我能解决这个问题。

我遇到的第一个错误是没有兼容版本postgresqlpython. 第二个错误是没有设置正确的路径变量。

希望这可以帮助有同样问题的人。谢谢你们:)