Link to home
Start Free TrialLog in
Avatar of PHIL Sawyer
PHIL SawyerFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Oracle connect

New to Pyhton - using 3.5 and my code  is...

import cx_oracle
connstr = 'userid/password@MGHJYT:1521/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
Avatar of Kanti Prasad
Kanti Prasad

Hi

Try

import cx_Oracle

The below link will be of some help

http://www.oracle.com/technetwork/articles/dsl/python-091105.html
Avatar of PHIL Sawyer

ASKER

Sorry
I forgot to mention that I have that in my code already.
My code works for Python V2.7 but not 3.5!?
ASKER CERTIFIED SOLUTION
Avatar of Kanti Prasad
Kanti Prasad

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I had the wrong version - downloaded correct version and works ok.
Thanks for your help.
Solved.
Regards