其次,将查询到的service_name替换sid即可:conn=cx_Oracle.connect('hr/admin@localhost:1521/EE.oracle.docker')