【问题标题】:pyodbc returning different set of driverspyodbc 返回不同的驱动程序集
【发布时间】:2016-12-31 05:04:19
【问题描述】:

当我运行以下一组行时,我会根据我当前正在处理的 conda env 得到两个不同的答案。

import pyodbc
pyodbc.drivers()

该环境是一个 2.7 32 位环境,我用来自动化我公司的一些报告,而根是一个 2.7 64 位环境。 当我在根环境中运行它时的列表是我转到 HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBCINST.INI 时的常规 ODBC 驱动程序列表,但我不知道环境列表是如何填充的。它在底部包含以下驱动程序。

理想情况下,我还想将 Access 2007 (*.accdb) 驱动程序添加到环境的可用驱动程序中。

谢谢!

  • conda-root 驱动程序

    • 亚马逊红移 (x64)
      • Microsoft Access 驱动程序(*.mdb、*.accdb)
      • Microsoft Access 文本驱动程序(*.txt、*.csv)
      • Microsoft Excel 驱动程序(*.xls、*.xlsx、*.xlsm、*.xlsb)
      • MySQL ODBC 5.3 ANSI 驱动程序
      • MySQL ODBC 5.3 Unicode 驱动程序
      • PostgreSQL ANSI(x64)
      • PostgreSQL Unicode(x64)
      • SQL 服务器
      • SQL Server Native Client 10.0
      • SQL Server Native Client 11.0
  • py27_32 驱动程序

    • SQL Server 本机客户端 10.0
      • Microsoft 文本驱动程序 (*.txt; *.csv)
      • Microsoft Paradox-Treiber (*.db)
      • SQL Server Native Client 11.0
      • CR ODBC XML 驱动程序 4.20
      • Microsoft Visual FoxPro 的驱动程序
      • Microsoft Visual FoxPro-Treiber
      • Microsoft dBase VFP 驱动程序 (*.dbf)
      • Microsoft FoxPro VFP 驱动程序 (*.dbf)
      • Microsoft Visual FoxPro 驱动程序
      • Microsoft para arquivos texto (*.txt; *.csv) 驱动程序
      • Microsoft Paradox (*.db) 驱动程序
      • Microsoft Text-Treiber (*.txt; *.csv)
      • Microsoft Paradox 驱动程序 (*.db)
      • Microsoft Excel(*.xls) 驱动程序
      • 适用于 Oracle 的 Microsoft ODBC
      • Microsoft Access-Treiber (*.mdb)
      • Microsoft Access 驱动程序 (*.mdb)
      • Microsoft dBase-Treiber (*.dbf)
      • Microsoft dBase (*.dbf) 驱动程序
      • Microsoft Excel 驱动程序 (*.xls)
      • Microsoft Excel-Treiber (*.xls)
      • SQL 服务器
      • Microsoft dBase 驱动程序 (*.dbf)
      • Microsoft Access (*.mdb) 驱动程序

【问题讨论】:

    标签: python windows virtualenv pyodbc conda


    【解决方案1】:

    找到的解决方案:

    显然,Windows 有一组单独的 32 位和 64 位 ODBC 驱动程序。可以在 64 位系统中找到 32 位驱动程序

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-06-18
      • 1970-01-01
      • 1970-01-01
      • 2018-06-30
      • 2016-11-09
      • 1970-01-01
      相关资源
      最近更新 更多