[Python] cx_Oracle python 2.6

Carlo Miron carlo a miron.it
Gio 31 Mar 2011 17:29:54 CEST


2011/3/31 Nicola Ferrari <nick.ferro a gmail.com>:
> Ciao a tutti.
> Ho installato python 2.6 e Oracle 10 Express Edition..
> Ho scaricato il pacchetto rpm cx_Oracle e lo ho convertito in pacchetto deb
> con alien.. ho installato cx_Oracle ma quando lo provo ad importare da
> python con "import cx_Oracle" mi dice che non trova il modulo...
> Dove sbaglio?

Prova con pip.

root a help:~# export
ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
root a help:~# pip install cx_Oracle
Downloading/unpacking cx-Oracle
  Downloading cx_Oracle-5.1.tar.gz (194Kb): 194Kb downloaded
  Running setup.py egg_info for package cx-Oracle
Installing collected packages: cx-Oracle
  Running setup.py install for cx-Oracle
    building 'cx_Oracle' extension
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
-Wstrict-prototypes -fPIC
-I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/demo
-I/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/public
-I/usr/include/python2.6 -c cx_Oracle.c -o
build/temp.linux-i686-2.6-10g/cx_Oracle.o -DBUILD_VERSION=5.1
    In file included from
/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/public/oci.h:2655,
                     from cx_Oracle.c:10:
    /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/public/oci1.h:148:
warning: function declaration isn’t a prototype
    In file included from
/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/public/ociap.h:222,
                     from
/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/public/oci.h:2679,
                     from cx_Oracle.c:10:
    /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/public/nzt.h:676:
warning: function declaration isn’t a prototype
    /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/public/nzt.h:2667:
warning: function declaration isn’t a prototype
    /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/public/nzt.h:2676:
warning: function declaration isn’t a prototype
    /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/public/nzt.h:2686:
warning: function declaration isn’t a prototype
    /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/public/nzt.h:2695:
warning: function declaration isn’t a prototype
    /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/public/nzt.h:2704:
warning: function declaration isn’t a prototype
    /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/public/nzt.h:2713:
warning: function declaration isn’t a prototype
    /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/public/nzt.h:2721:
warning: function declaration isn’t a prototype
    /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/public/nzt.h:2731:
warning: function declaration isn’t a prototype
    /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/public/nzt.h:2738:
warning: function declaration isn’t a prototype
    /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/public/nzt.h:2746:
warning: function declaration isn’t a prototype
    In file included from
/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/public/oci.h:2679,
                     from cx_Oracle.c:10:
    /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/public/ociap.h:10069:
warning: function declaration isn’t a prototype
    /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/rdbms/public/ociap.h:10075:
warning: function declaration isn’t a prototype
    gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions
build/temp.linux-i686-2.6-10g/cx_Oracle.o
-L/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib
-L/usr/lib/oracle/xe/app/oracle/product/10.2.0/server -lclntsh -o
build/lib.linux-i686-2.6-10g/cx_Oracle.so
Successfully installed cx-Oracle
Cleaning up...
root a help:~#

©
-- 
Carlo Miron
Open Source Solution Architect


Maggiori informazioni sulla lista Python