[cx-oracle-users] Installation on a CentOS 6.3 system appears to work but still unable to import cx
Brought to you by:
atuining
From: James A. <mon...@gm...> - 2013-03-27 21:42:37
|
I have attempted to install cx_Oracle onto a CentOS 6.3 system but it seems that I've failed somehow. I have used the RPM for my environment (Oracle 11g and Python 2.7.3, http://prdownloads.sourceforge.net/cx-oracle/cx_Oracle-5.1.2-11g-py27-1.x86_64.rpm?download) and installed this using rpm, like so: rpm -ivh cx_Oracle-5.1.2-11g-py27-1.x86_64.rpm This command appears to run without error, however when I try using cx_Oracle in Python I get an import error: >>> import cx_Oracle Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named cx_Oracle So apparently I've not yet done everything I need to do in order to use the cx_Oracle module. Can anyone advise as to what else I need to do? One thought is that since I'm on CentOS 6.x then the RPM files available from the cx_Oracle page aren't valid since they're listed as RPMs for CentOS 5 and therefore perhaps not forward compatible. If this is the case then do I need to build from source on my platform? I've actually tried doing this already and immediately ran into compilation errors: $ python setup.py build running build running build_ext building 'cx_Oracle' extension creating build creating build/temp.linux-x86_64-2.6-11g gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/home/jadams/cx_Oracle/instantclient_11_2/sdk/include -I/usr/include/python2.6 -c cx_Oracle.c -o build/temp.linux-x86_64-2.6-11g/cx_Oracle.o -DBUILD_VERSION=5.1 cx_Oracle.c:6:20: error: Python.h: No such file or directory cx_Oracle.c:7:22: error: datetime.h: No such file or directory cx_Oracle.c:8:26: error: structmember.h: No such file or directory In file included from cx_Oracle.c:137: Buffer.c:13: error: expected specifier-qualifier-list before âPyObjectâ Buffer.c: In function âcxBuffer_Initâ: Buffer.c:28: error: âudt_Bufferâ has no member named âobjâ Buffer.c: In function âcxBuffer_Copyâ: Buffer.c:44: warning: implicit declaration of function âPy_XINCREFâ Buffer.c:44: error: âudt_Bufferâ has no member named âobjâ .....and thousands more lines of errors..... Is there a YUM package for cx_Oracle? If so how can I locate/install it? (sorry for a maybe dumb question -- my Linux sysadmin skills are feeble) Any suggestions will be greatly appreciated, thanks in advance for your help! --James |