【问题标题】:Methods to connect to AWS Redshift through Python 3.x (Windows7) apart from using psycopg2除了使用 psycopg2 之外,通过 Python 3.x (Windows7) 连接到 AWS Redshift 的方法
【发布时间】:2018-06-14 00:52:38
【问题描述】:

除了使用 psycopg2 之外,还有其他方法可以在 Windows 7 - 64 位平台上通过 Python 3.x 连接到 AWS Redshift 吗? psycopg2 是我们唯一可以用来连接 Redshift 的库吗?

【问题讨论】:

  • 您想做什么但不能/您在使用 psycopg2 时遇到什么问题?
  • 我试图在 Windows 64 位平台上的 Python 3.7 上安装 psycopg2。我遇到了 libpq.lib 文件错误。我尝试了简单的安装过程,但问题仍然没有得到解决。在 google 和 StackOverflow 中搜索后,我发现 Python 3.7 尚不支持最新的稳定版本 psycopg2(2.7.4)。它支持到 3.6 我在 Anaconda 中将我的 python 降级到 3.6.5,并通过 PyCharm 降级到 2.7.15。我能够在两者中安装 psycopg2 并使用它们。

标签: python-3.x amazon-redshift psycopg2


【解决方案1】:

您可以在 postgres wiki 上找到所有可用的驱动程序:https://wiki.postgresql.org/wiki/Python

Windows 还支持另一种驱动程序,但一般来说psycopg2 是您最好的选择。

【讨论】:

    猜你喜欢
    • 2022-08-22
    • 1970-01-01
    • 1970-01-01
    • 2016-10-01
    • 1970-01-01
    • 2021-09-05
    • 1970-01-01
    • 2019-05-22
    • 1970-01-01
    相关资源
    最近更新 更多