cjava
cjava

Reputation: 658

cx_oracle 6 for Oracle 12C version error

I am trying to use oracle 12c as database for my application using Django framework. But I am struck in version related issue

Following are the version of library used:

OS is windows 7

Following are the steps which I did to install cx_oracle

  1. pip install cx_Oracle
  2. Download Oracle instant client 12.2 zip file for windows
  3. Extracted the zip file
  4. Added the above unzipped folder to user PATH variable

From CMD I try to execute

python 
import cx_Oracle 
con = cx_Oracle.connect(uname, pwd, server_ip:port/name)

I am getting the error:

cx_oracle.databaseerror: dpi-1050: oracle client library must be at version 11.2 or higher

Is cx_Oracle having any conflict with oracle 10 g installed at local machine I cannot upgrade the local oracle 10g db because(no rights given)

How do I resolved the above issue. How can I make sure cx_Oracle uses the correct Oracle instant client( i.e, 12.2) to connect to server db.

Upvotes: 2

Views: 556

Answers (2)

Anthony Tuininga
Anthony Tuininga

Reputation: 7086

Make sure that the directory containing the instant client is earlier in the PATH environment variable than your 10g installation. That should resolve it for you.

Upvotes: 2

Christian Arias
Christian Arias

Reputation: 61

you use set ORACLE_HOME too:

SET ORACLE_HOME=C:\Oracle\client_12_1
SET PATH=C:\Oracle\client_12_1\bin;%PATH%
python 
import cx_Oracle 
con = cx_Oracle.connect(uname, pwd, server_ip:port/name)

Upvotes: 1

Related Questions