无法在Windows上安装雪花连接器python

时间:2020-05-13 15:53:27

标签: python snowflake-cloud-data-platform

有人可以帮我安装用于Python的Snowflake连接器,以便通过python我们可以在雪花中执行查询。

我使用的是python 3.7.4版本,以下是我尝试使用pip安装时收到的错误:

(base) C:\Users\a662919>pip install --upgrade snowflake-connector-python
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001A8B0597948>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/snowflake-connector-python/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001A8B02E7308>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/snowflake-connector-python/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001A8B02E7688>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/snowflake-connector-python/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001A8B0599788>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/snowflake-connector-python/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001A8B0599848>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/snowflake-connector-python/
ERROR: Could not find a version that satisfies the requirement snowflake-connector-python (from versions: none)
ERROR: No matching distribution found for snowflake-connector-python

2 个答案:

答案 0 :(得分:0)

错误Connection to pypi.org timed out.(假设您的Internet连接正常运行),可能(除其他可能性外)指示您正在使用pip命令未使用的代理,或管理防火墙规则已到位,可防止您从组织内部与Python软件包存储库建立连接。

如果问题仅是代理的问题,请通过HTTP_PROXY环境变量在命令提示符中显式try specifying your web proxy URL,然后重试:

(base) C:\Users\a662919> set HTTP_PROXY=http://username:password@your-proxy-host:your-proxy-port

(base) C:\Users\a662919> pip install --upgrade snowflake-connector-python

如果尽管指定了代理仍然继续收到确切的错误,则可能是您遇到了防火墙规则或其他形式的管理块。在这种情况下,与您的IT人员(或类似人员)联系以进行澄清(通过访问pypi.org)将是一个不错的下一步。

答案 1 :(得分:0)

最新版本应该可以解决此问题。如果可能,还请使用虚拟环境。