import cx_Oracle as oracle # 注意下划线
db=oracle.connect('oracle/password@192.168.0.103:1521/orcl')
cursor=db.cursor()
cursor.execute("select * from student")
rs=cursor.fetchall()
for row in rs:
print (row)
cursor.close()
db.close()
cx-Oracle在pip安装时是pip install cx-Oracle
在导入时为import cx_Oracle