InterfaceError: Unable to acquire Oracle environment handle; ORACLE_HOME is correct and SQL*Plus will connect
cx-oracle, oracle, python
Solution
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.
Problem
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... running Dependency Walker tells me I'm missing the following .dll's MSVCR90, GPSVC, IESHIMS. I'm running the instant client for Oracle 11g and Python 2.7. Anyone have any ideas? Most of the answers I have found entail an incorrect path, but that doesn't seem to be the case... additionally, I can't find any of those .dll's anywhere else on my system. EDIT: I ended up installing Oracle XE 11g (32 bit); both Python 2.7 and the cx_Oracle are also 32 bit (I should also add that I'm on Windows). cx_Oracle now installs cleanly; however upon connection I receive an error: ``` InterfaceError: Unable to acquire Oracle environment handle ``` The ORACLE_HOME path is correct, as is the bin in the PATH folder...