cx_Oracle imports wrong module
Question: I am trying to connect to an Oracle DB v.9. I downloaded latest Instant Client
(12.1.0.2.0) + SDK, then cx_Oracle. When trying to connect to the DB it says

    
    
    cx_Oracle.DatabaseError: ORA-03134: Connections to this server version are no longer supported.
    

so I tried installing an older version of Instant Client 10.2.0.5:

    
    
    sudo yum remove oracle-instantclient12.1-basic
    sudo yum install /vagrant/oracle-instantclient-devel-10.2.0.5-1.x86_64.rpm
    

and updated my env:

    
    
    export ORACLE_HOME=/usr/lib/oracle/10.2.0.5/client64/
    export LD_LIBRARY_PATH=/usr/lib/oracle/10.2.0.5/client64/lib/
    

but when I try to run my Python script, cx_Oracle says:

    
    
    ImportError: libclntsh.so.12.1: cannot open shared object file: No such file or directory
    

Of course there's no such file or directory: I have version 10.2.0.5, not
12.1. And my file is called `libclntsh.so.10.1`, not `libclntsh.so.12.1`. How
do I make cx_Oracle import the right file? Or is there a way to make Instant
Client v.12 work with server v.9?


Answer: Oracle guarantees backwards compatibility for two versions. So Version 10 can
access version 8, 9, 10. Version 12 can only access version 10 and up.

You need to do a clean install of the correct client.

