Search code examples
pythonanacondajupyter-notebookpandasql

How do I connect oracle DB with my python script?


I have a requirement to connect oracle DB with python and covert them as Dataframe. Would like to know what are the easy packages available and how to install them ?

I am using Anaconda 3(Python 3.5.2), I tried with cx_oracle but couldn't install because of dependencies. Heard about SQLAlchemy bit not sure how to use it.


Solution

  • At last it worked after following the below steps,

    1.Download and unzip version 12 from http://www.oracle.com/technetwork/topics/winsoft-085727.html. 2.Add "ORACLE_HOME" as a Windows environment variable and set its value to ...\instantclient_12_1, (not its containing folder!). 3.Add this same path to the "Path" environment variable. 4.Only now install cx_Oracle. 5.Reboot the system

    Thanks much for everyone!