Cx_oracle Does Not Recognize Location Of Oracle Software Installation For Installation On Linux
Solution 1:
Updated
As Petriborg suggested, setting LD_RUN_PATH
at build time will include the path to the Oracle shared library files in the cx_Oracle
shared library that is built during installation. This obviates the need for LD_LIBRARY_PATH
as I suggested in my first answer.
For the RPMs that you are using, ORACLE_HOME
should be set to /usr/lib/oracle/12.1/client
. If you are using pip
:
$ export ORACLE_HOME=/usr/lib/oracle/12.1/client$ export LD_RUN_PATH=/usr/lib/oracle/12.1/client/lib:$LD_RUN_PATH$ pip install cx_Oracle$ python -c 'import cx_Oracle; print(cx_Oracle.version)'
5.1.3
Read this documentation for some info on installing and executing applications that use the client libraries.
Solution 2:
When I tried installing cx_Oracle with LD_LIBRARY_PATH variable alone in Ubuntu 16.04 with python 2.7.12 and Oracle client 12.1.0.2 pip install fails and is looking for header files which are no more available with Oracle 12.1.0.2 client. It works fine with LD_RUN_PATH
Post a Comment for "Cx_oracle Does Not Recognize Location Of Oracle Software Installation For Installation On Linux"