Thread: [cx-oracle-users] cx_Oracle import problems
Brought to you by:
atuining
From: <fel...@ba...> - 2005-09-08 11:42:22
|
Dear all, I use Python 2.4, Oracle 9.2.0 Client and installed cx_Oracle-4.1-9i-py24-1.i386.rpm on RedHat 9. [phulf@bycc19] (~): python Python 2.4.1 (#1, Jun 21 2005, 04:34:09) [GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.path ['', '/usr/local/eclipse_31/eclipse/plugins/org.python.pydev_0.9.8.1/Py= Src', '/usr/lib/python2.4', '/usr/lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-dynload', '/usr/lib/python2.4/site-packages', '/usr/local/lib/python2.4/site-packages', '/u01/apps/oracle/9.2.0/lib',= '/usr/lib/python24.zip', '/usr/lib/python2.4/lib-tk'] >>> import cx_Oracle Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: libclntsh.so.9.0: cannot open shared object file: No such = file or directory >>> [phulf@bycc19] (~): ll `echo $PYTHONPATH | sed 's/:/ /g'` | grep libclntsh.so.9.0 -rwxr-xr-x 1 root root 11529427 Sep 6 15:54 libclntsh.so.9.= 0 --------------------------------------------------------------- I also tried it on my windows XP Professional host: oracle 10.2.0 client, tested. Python 2.4 cx_Oracle-4.1-win32-10g-py24.exe Error: Der Prozedureinsprungpunkt "OCINlsNumericInfoGet" wurde in der DLL "OC= I.dll" nicht gefunden. (Pocedurecall "OCINlsNumericInfoGet" was not found in "OCI.dll") Mit freundlichen Gr=FC=DFen / Best Regards Felix Uellendahl = |
From: Marcos P. <ma...@bu...> - 2005-09-08 11:59:07
|
You must include the location of this file ($ORACLE_HOME/lib) in your LD_LIBRARY_PATH I hope it helps. The other case seems to be a version mismatch :-| El jue, 08-09-2005 a las 13:42 +0200, fel...@ba... escribi=C3=B3: > ImportError: libclntsh.so.9.0: cannot open shared object file: No such > file or --=20 Marcos S=C3=A1nchez Provencio <ma...@bu...> |
From: Markus E. <mar...@me...> - 2005-09-08 12:03:31
Attachments:
markus.edelmann.vcf
|
Hi Felix, please define in /etc/profile the following lines: # change these settings according to your installation ORACLE_BASE=/home/oracle #ORACLE_SID= # these are Oracles default values, you should probably leave them as they are ORACLE_HOME=$ORACLE_BASE/product/9.2.0 ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data PATH=$PATH:$ORACLE_HOME/bin LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$ORACLE_HOME/lib TCL_LIBRARY=$ORACLE_HOME/network/agent/tcl # For German Umlauts NLS_LANG=AMERICAN_GERMANY.WE8ISO8859P15 export ORACLE_BASE export ORACLE_HOME ORA_NLS33 ORACLE_SID PATH LD_LIBRARY_PATH export NLS_LANG export TCL_LIBRARY With this settings, all users will get the necessary Oracle-client-environment for connecting against Oracle-DBs. As root now install cx_Oracle again with python setup.py... Greetings, Ede fel...@ba... wrote: > > >Dear all, > >I use Python 2.4, Oracle 9.2.0 Client and installed >cx_Oracle-4.1-9i-py24-1.i386.rpm on RedHat 9. > >[phulf@bycc19] (~): python >Python 2.4.1 (#1, Jun 21 2005, 04:34:09) >[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2 >Type "help", "copyright", "credits" or "license" for more information. > > >>>>import sys >>>>sys.path >>>> >>>> >['', '/usr/local/eclipse_31/eclipse/plugins/org.python.pydev_0.9.8.1/PySrc', >'/usr/lib/python2.4', '/usr/lib/python2.4/plat-linux2', >'/usr/lib/python2.4/lib-dynload', '/usr/lib/python2.4/site-packages', >'/usr/local/lib/python2.4/site-packages', '/u01/apps/oracle/9.2.0/lib', >'/usr/lib/python24.zip', '/usr/lib/python2.4/lib-tk'] > > >>>>import cx_Oracle >>>> >>>> >Traceback (most recent call last): > File "<stdin>", line 1, in ? >ImportError: libclntsh.so.9.0: cannot open shared object file: No such file or >directory > > > >[phulf@bycc19] (~): ll `echo $PYTHONPATH | sed 's/:/ /g'` | grep >libclntsh.so.9.0 >-rwxr-xr-x 1 root root 11529427 Sep 6 15:54 libclntsh.so.9.0 >--------------------------------------------------------------- > >I also tried it on my windows XP Professional host: >oracle 10.2.0 client, tested. >Python 2.4 >cx_Oracle-4.1-win32-10g-py24.exe > >Error: > Der Prozedureinsprungpunkt "OCINlsNumericInfoGet" wurde in der DLL "OCI.dll" >nicht gefunden. >(Pocedurecall "OCINlsNumericInfoGet" was not found in "OCI.dll") > > > > >Mit freundlichen Grüßen / Best Regards > >Felix Uellendahl > > > > >------------------------------------------------------- >SF.Net email is Sponsored by the Better Software Conference & EXPO >September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices >Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA >Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf >_______________________________________________ >cx-oracle-users mailing list >cx-...@li... >https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: <fel...@ba...> - 2005-09-08 13:04:50
|
Hello Markus, thank you, that works fine! Has anybody a suggestion, what is the best way to setup the rigth envir= onment on windows? Mit freundlichen Gr=FC=DFen / Best Regards Felix Uellendahl= |
From: Uwe H. <qu...@ti...> - 2005-09-12 20:33:34
|
fel...@ba... schrieb: > > Has anybody a suggestion, what is the best way to setup the rigth environment on > windows? > you can also try the oracle instant client, which doesn't use either the registry or ORACLE_HOME. (only PATH and if needed NLS_LANG and TNS_ADMIN) http://www.oracle.com/technology/tech/oci/instantclient/instantclient.html regards uwe |