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

前端 未结 5 877
长发绾君心
长发绾君心 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:25

    I recall having to mess with this a lot to get it to work. In my .bash_profile on a system running Oracle XE, I have:

    export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
    export SID=XE
    export LD_LIBRARY_PATH=$ORACLE_HOME:$ORACLE_HOME/lib
    export PATH=$PATH:$ORACLE_HOME/bin
    

提交回复
热议问题