PHIL Sawyer
asked on
Oracle connect
New to Pyhton - using 3.5 and my code is...
import cx_oracle
connstr = 'userid/password@MGHJYT:15 21/Test001 '
connection = cx_oracle.connect(connstr)
cursor = connection.cursor()
cursor.execute("SELECT * FROM MYTABLE")
cursor.close()
connection.close()
Keep getting error.....
import cx_oracle
ImportError: No module named 'cx_oracle'
Aany help much appreciated.
Regards
import cx_oracle
connstr = 'userid/password@MGHJYT:15
connection = cx_oracle.connect(connstr)
cursor = connection.cursor()
cursor.execute("SELECT * FROM MYTABLE")
cursor.close()
connection.close()
Keep getting error.....
import cx_oracle
ImportError: No module named 'cx_oracle'
Aany help much appreciated.
Regards
ASKER
Sorry
I forgot to mention that I have that in my code already.
I forgot to mention that I have that in my code already.
ASKER
My code works for Python V2.7 but not 3.5!?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I had the wrong version - downloaded correct version and works ok.
Thanks for your help.
Thanks for your help.
ASKER
Solved.
Regards
Regards
Try
import cx_Oracle
The below link will be of some help
http://www.oracle.com/technetwork/articles/dsl/python-091105.html