Cx_Oracle problem trying to import python

I am trying to run python in Apache WS on linux RHEL x86_64.

After installing and configuring Python2.5 and Apache, I install Oracle Instant Client (basic and sdk) in a .rpm file with any problem.

oracle-instantclient-basic-10.2.0.4-1.x86_64.rpm
oracle-instantclient-devel-10.2.0.4-1.x86_64.rpm

I set envoirment variables

export ORACLE_HOME=/appl/paths/instantclient_10_2
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$PATH

Then install cx_Oracle using the .rpm file again and again with any problem.

cx_Oracle-5.0.3-10g-unicode-py25-1.x86_64.rpm

When I try to import cx_Oracle in python, I got a message

Python 2.5.2 (r252:60911, Jul  1 2010, 17:47:36)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cx_Oracle
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /appl/paths/python2.5/site-packages/cx_Oracle.so: undefined symbol: OCIDBShutdown

I am responsible for the answers without success. Any advice?

+3
source share
2 answers

The problem was in ORACLE_HOME, typos were written there

+1
source

, cx_Oracle (4.3.1 5.1.2). .

0

Source: https://habr.com/ru/post/1754033/


All Articles