在 Windows 10 / Python 3.6 上安装 Sybase 软件包失败

Failure to install Sybase package on Windows 10 / Python 3.6

我想连接到 PyCharm 中的 Sybase 数据库。从可用软件包和终端安装时出现以下错误:

(venv64) C:\Users\xxxx\Documents\PyCharm\EOM_ML_201901>pip install sybase
ERROR: Could not find a version that satisfies the requirement sybase (from versions: none)
ERROR: No matching distribution found for sybase

(venv64) C:\Users\xxxx\Documents\PyCharm\EOM_ML_201901>pip install python-sybase
ERROR: Could not find a version that satisfies the requirement python-sybase (from versions: none)
ERROR: No matching distribution found for python-sybase

有没有人在Win10上安装成功?

彼得

我遇到了同样的挑战。我通过使用此处提供的适用于 ASE 的 Devart ODBC 驱动程序的试用版 https://www.devart.com/odbc/ase/download.html

解决了这个问题

驱动安装完成后,就可以进行配置了。为此,在控制面板中打开管理工具并找到数据源 (ODBC) 工具。为 ASE 添加 Devart ODBC 驱动程序并设置您的 ASE 凭据。

然后从您的 PyCharm,使用以下命令连接到您的 ASE:

import pyodbc 
cnxn = pyodbc.connect('DRIVER={Devart ODBC Driver for ASE}; Server=myserver; Port=myport; Database=mydatabase; User ID=myuserid; Password=mypassword; String Types=Unicode')