为Hana安装Pyhdb或Pyo​​dbc

时间:2016-05-02 23:20:34

标签: python pyodbc hana

我想将Python(Anaconda)与我的HANA数据库连接起来。我正在尝试为HANA安装pyhdb连接器。甚至尝试过Pyodbc。

但是我对两个

都有同样的错误
SFOM00618927A:~ i854319$ pip install pyhdb
Collecting pyhdb
  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x104467fd0>: Failed to establish a new connection: [Errno 61] Connection refused',)': /simple/pyhdb/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x104467810>: Failed to establish a new connection: [Errno 61] Connection refused',)': /simple/pyhdb/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x104467ad0>: Failed to establish a new connection: [Errno 61] Connection refused',)': /simple/pyhdb/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x104467ed0>: Failed to establish a new connection: [Errno 61] Connection refused',)': /simple/pyhdb/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x104467550>: Failed to establish a new connection: [Errno 61] Connection refused',)': /simple/pyhdb/
  Could not find a version that satisfies the requirement pyhdb (from versions: )
No matching distribution found for pyhdb

Pyodbc也有类似的错误。我安装了HANA并安装了Anaconda。

2 个答案:

答案 0 :(得分:1)

如果您在代理服务器后面,则会遇到此错误。

检查Pip proxy argument是否也可能是您的问题。

pip install pyhdb --proxy [user:passwd@](proxy server):(port)

答案 1 :(得分:0)

您应该尝试以下分叉:https://github.com/hpi-epic/PyHDB

对于PIP:pip install git+git://github.com/hpi-epic/PyHDB

此分支修复了所有未解决的问题以及一些额外的进展。