Python and cx_Oracle (or another solution)

Hello,

I've been trying to compile cx_Oracle to work with Python without success. I've installed the linux_base, linux-oracle-instantclient-basic, linux-oracle-instantclient-sdk and linux-oracle-instantclient-sqlplus ports and setup the ORACLE_HOME correctly. I've configured the linux_enable="YES" on rc.conf. When I try to compile cx_Oracle, I always got a:

Code:
# python setup.py build
libclntsh.so: could not read symbols: File in wrong format
error: command 'cc' failed with exit status 1

Thing is, I really need to access an Oracle database from Python, and I've read that I need to compile Python to run in linux compatible mode to install cx_Oracle, how do I do that? Plus, if one of you guys have a sucessful Python setup to access an Oracle 9i database (it doesn't need to be cx_Oracle, exactly) would you mind to share the steps to take?

Thanks in advance.
 
Thanks for the answer, SirDice. Did you manage to find any solution to access Oracle from Python? At the moment I'm calling some PHP code to access the database, it's just plain ugly and kills me inside.
 
Telefunken said:
Thanks for the answer, SirDice. Did you manage to find any solution to access Oracle from Python? At the moment I'm calling some PHP code to access the database, it's just plain ugly and kills me inside.

Telefunken, we've been using FreeBSD/Python/cx_Oracle to connect to Oracle since 2008.

Looking at your error message:
Code:
# python setup.py build
libclntsh.so: could not read symbols: File in wrong format
error: command 'cc' failed with exit status 1

It may be that you're running 64-bit FreeBSD with the 32-bit Oracle. Is this correct?
 
Back
Top