Open jiangtaobian opened 4 months ago
Please upgrade to python-oracledb, and review https://github.com/oracle/python-oracledb/issues/31
noticed this message when I attemp to use python-oracledb: DPY-3010: connections to this database server version are not supported by python-oracledb in thin mode
Oracle Version: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
python-oracledb has a Thick mode that is equivalent to cx_Oracle, and will connect to Oracle Database 11gR2, so you should upgrade to python-oracledb. You'll need to install Oracle Instant Client on the target machine, and add a call to init_oracle_client()
to your code which will enable Thick mode and load Instant Client libraries.
Packing command:pyinstaller.exe --add-binary='D:\instantclient_11_2*':. --onefile .\myscript.py
Error information: Traceback (most recent call last): File "myscript.py", line 1, in
ModuleNotFoundError: No module named 'cx_Oracle'
[10136] Failed to execute script 'oadoc' due to unhandled exception!
''' import cx_Oracle hostname = 'my_hostname' port = 'port' service_name = 'service_name' username = 'username' password = 'password'
conn = cx_Oracle.connect(f"{username}/{password}@{hostname}:{port}/{service_name}") print(conn)
conn.close() '''