Is it possible to install both 32 and 64-bit Oracle Instant Client for cx_Oracle?

1.6k views Asked by At

I have been using 32 bit Python 3.6 and connecting to an oracle database by using the 32 bit oracle instant client.

My current project requires me to use a 64 bit python 3.8 as I need to use different libraries. This means using oracle instant client 64 bit if I want to use CX oracle.

My worry is that i might run into issues installing both. Has anyone installed both 32 and 64 bit versions and can run both instances of CX oracle with no issues?

I have not installed it on my system as I require approvals from my workplace. I am also worried that the downloads may be placed in locations that I am not aware of and I would not be able to fix it should I install both versions.

Based on questions I've seen, oracle client doesn't do well with both 32 and 64 bit, but no mention of oracle INSTANT client.

Edit: I have tried using python-oracledb but my login faced the issue of case_sensitive_logon being set to False. To resolve this I would have to use the thick driver which requires instant client based on the documentation I have read, which leads me back to the same problem.

1

There are 1 answers

5
Christopher Jones On

Instant Client ZIP files can be installed into any subdirectory you like. You can install 32-bit and 64-bit into different locations on the same machine. At runtime you will need to set the library search path to the appropriate Instant Client directory for the tool you want to run. For example on Windows you would need to set PATH. On Linux you would need to set LD_LIBRARY_PATH. Often this can be done in a batch or shell script that also invokes your tool or program.

As noted in comments, the latest version of cx_Oracle, now called python-oracledb, doesn't necessarily need Instant Client, so you should/could consider upgrading. See the python-oracledb release announcement.