InterfaceError: Unable to acquire Oracle environment handle; ORACLE_HOME is correct and SQL*Plus will connect

前端 未结 5 903
长发绾君心
长发绾君心 2021-01-04 09:31

I\'m getting the standard \"DLL load failed; module not found\" error when trying to import cx_Oracle. I have the proper instant client installed, the paths are all correct

5条回答
  •  失恋的感觉
    2021-01-04 10:14

    I had the same issue: you have to set the variable ORACLE_HOME to match your Oracle client folder (on Unix: via a shell, for instance; on Windows: create a new variable if it does not exist in the Environment variables of the Configuration Panel) since this is the way the cx_Oracle module can link to it.

    Your folder $ORACLE_HOME/network/admin (%ORACLE_HOME%\network\admin on Windows) is the place where your tnsnames.ora file should exist.

提交回复
热议问题