Using Windows 2008 R2 Server. Server was completely clean. Installed 64-bit Python 3.5, 64-bit Oracle Instant Client 12c. pip installed cx_Oracle successfully. When I try to run a python script that imports cx_Oracle however, I get:
ImportError: DLL load failed: The specified module could not be found.
The instant client path is in the PATH
environmental variable. I also made another system variable called ORACLE_HOME
with the same instant client path.
I've double checked everything is 64-bit, and looked through SO at the many other times this has come up, and no answer has helped.
First, the environment variable ORACLE_HOME should not be set when an instant client is used. Setting it can have unintended side effects!
Second, if you used pip to install cx_Oracle that suggests you have a compiler and it succeeded in compiling the module. Check to make sure that it used the correct libraries.
Third, you can also download and install a pre-built binary from the PyPI site and see if that helps matters any. Make sure you pick the Python 3.5, 64-bit, Oracle 12c version that is listed there. The PyPI site link is here:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.