Reputation: 5428
I have both wamp and python on a single machine. For very specific reasons PHP needs to use the 64bit version of oracles instaclient and python needs to use the 32bit version. My Path variable points to the 64bit version. This is obviously no good for my 32bit Python.
Is there a way I can point python cx_oracle to look specifically at the 32bit version of instantclient.
Upvotes: 1
Views: 1301
Reputation: 1084
You can start your script by setting the environment variables correctly. For example, if you run your script from command line like this and set the environment variables, it should work as expected. Bu do not forget to remove 64bit instant client path from %path%, I just put this as an example. Just add your paths as semicolon seperated, or you can create a python script removing/changing the environment variables and starting your application.
C:\Windows\System32\cmd.exe /c "set ORACLE_HOME=D:\oracle && PATH=%path% && yourscript.py"
Your second option is to copy the instant client files to your application working directory.
Upvotes: 1