【问题标题】:Python 3 and Sybase and other databasesPython 3 和 Sybase 等数据库
【发布时间】:2014-03-21 01:29:07
【问题描述】:

我是 python 新手。对不起,如果这是一个菜鸟问题。但我仍在搜索如何使用 python 3 连接到数据库。我在一些网站、论坛上看到的大部分内容都是关于 python 2。python 3 是否有任何好的 DBAPI 或数据库驱动程序(尤其是 sybase、oracle 和sqlserver)?

或者有人成功地使用 2to3 移植了 sybase 库吗?我没有运气。 :(

【问题讨论】:

    标签: database python-3.x sybase


    【解决方案1】:

    要将 Python(支持 2.6、2.7 和 3.1)与 Sybase ASE 一起使用,您需要做两件事:

    • sybpydb Python 扩展模块
    • Sybase Open Client SDK

    Sybase 有documentation for programmers wishing to connect to Sybase ASE with Python

    如果您将 Python 与 Sybase SQLAnywhere 一起使用,则需要 sqlanydb 模块。

    这里是documentation for using Sybase SQLAnywhere with Python

    【讨论】:

    • 不确定。它可能适用于 3.3,但不受官方支持。
    • 我在导入 sybpydb 时遇到此错误“libsybdbcapi_r64.so:无法打开共享对象文件:没有这样的文件或目录”。我已经将 lib 添加到 sys.path。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-01-26
    • 1970-01-01
    • 2013-04-02
    • 2023-04-05
    • 2017-02-21
    • 2017-03-22
    相关资源
    最近更新 更多