Small updates it seems to get cx_Oracle working with Python 3 on Ubuntu 14.04. Assume sudo/root for all the following.
- Download the RPM versions of both the basic and SDK clients for 188.8.131.52 from http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
- Note: If you're not familiar with the idiotic hell that is Oracle downloads, you have to do this on a browser where you can click a radio button and THEN download, so wget from the server on wish you actually want to install this stuff is unfortunately a no go.
- The 12.x version of this stuff still doesn't work with cx_Oracle. At least not for me.
- scp the rpm files to the target server
- ssh to the target server
- apt-get install libaio1 alien
- For both the RPMs:
alien -d RPM_FILE_NAME
- For both the newly created Debian packages:
dpkg -i DEBIAN_PACKAGE_NAME
- touch /etc/ld.so.conf.d/oracle.conf
- echo "/usr/lib/oracle/11.2/client64/lib" > /etc/ld.so.conf.d/oracle.conf
- echo "export ORACLE_HOME=/usr/lib/oracle/11.2/client64" >> /etc/environment
- echo "export LD_LIBRARY_PATH=\$ORACLE_HOME/lib" >> /etc/environment
- source /etc/environment
- pip3 install cx-oracle
- Put the relevant tnsnames.ora in $ORACLE_HOME/network/admin
Note that unlike my previous instructions you can install cx_Oracle using pip3 once you have everything in place. Maybe you could use pip before but I seemed to have better luck with the converted RPM, and at that point I was kind of tearing my hair out so I probably didn't go back to take a run at it using pip once the Oracle bits were sorted.
The big change here is the necessity to install both the basic client and the SDK client packages for Oracle; it worked with Python 2.7 on Ubuntu 12.04 without the SDK package.