【问题标题】:MOD_WSGI cannot locate Oracle instantclient libraryMOD_WSGI 找不到 Oracle 即时客户端库
【发布时间】:2020-03-06 12:02:14
【问题描述】:

我有一个使用mod_wsgiApache server 上运行的烧瓶应用程序。一切正常,直到我尝试使用 cx_Oracle 访问数据库。那时我收到以下错误:

sqlalchemy.exc.DatabaseError: (cx_Oracle.DatabaseError) DPI-1047: Cannot locate a 64-bit Oracle Client library: "The specified module could not be found". See https://oracle.github.io/odpi/doc/installation.html#windows for help.

我已将客户端库路径添加到 os 环境变量中。 如果我从 Pycharm IDE 启动应用程序,效果很好。

我什至在我的.wsgi 文件中添加了以下行。

sys.path.append('D:\FlaskDev\instantclient_11_2')

有人可以帮忙吗?提前致谢

【问题讨论】:

    标签: python apache mod-wsgi cx-oracle


    【解决方案1】:

    如果您的 python 是 64 位,您也必须使用 64 位即时客户端。 尝试按照this 的说明进行操作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-03-22
      • 1970-01-01
      • 2013-06-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-12-05
      相关资源
      最近更新 更多