first question i really had to ask on stackoverflow! I'm trying to use cx_Oracle Python module to use SQL queries inside Google Colab. However, for cx_oracle to properly run I need Oracle instantclient installed - this is a problem as Colab works on VM. Without the client, I get error:
"DatabaseError: (cx_Oracle.DatabaseError) DPI-1047: Cannot locate a 64-bit Oracle Client library: "libclntsh.so: cannot open shared object file: No such file or directory"."
I tried to put oracle instantclient_18_5 unzipped folder into my GDrive where the Colab script is. After that, I've tried to change LD_LIBRARY_PATH to point to it, but no matter what I do, LD_LIBRARY_PATH directory is /usr/local/nvidia/lib:/usr/local/nvidia/lib64 .
!sudo apt-get install python-dev build-essential libaio1
!python -m pip install cx_Oracle --upgrade
''' I tried a lot of code found on the internet to change this LD_LIBRARY_PATH but to no avail. Example:'''
!export LD_LIBRARY_PATH="/content/gdrive/Team Drives/.../instantclient_18_5":$LD_LIBRARY_PATH
I would like either to install Oracle client onto google VM, or do something that it could take it from Gdrive. Whatever would work so I could use cx_oracle on Google Colab will be enough for me.
EDIT: To clarify, any way of connecting my Oracle SQL database to Google Colab python notebook will be fine! Does not have to be through cx_oracle exclusively.