cx_Oracle #3381
-
|
I can't build with this package on Windows |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Why Add it to your dependencies: # pyproject.toml
dependencies = ["oracledb"]import oracledb
conn = oracledb.connect(user="scott", password="tiger", dsn="host:1521/service_name")
cur = conn.cursor()
cur.execute("SELECT 1 FROM dual")
print(cur.fetchall())The API is largely a drop-in for Let know if you face issues. |
Beta Was this translation helpful? Give feedback.
cx_Oraclecan't be supported in a Flet mobile app, but the good news is there's a fully working replacement that already is.Why
cx_Oraclewon't work on mobile: cx_Oracle only runs in "thick" mode — it bundles ODPI-C, whichdlopens the proprietary Oracle Instant Client (libclntsh) at runtime to talk to the database. Oracle does not ship Instant Client for iOS or Android, so there is no client library for the package to load on a phone. Even if the wheel built, it could never open a connection on-device. It's also deprecated upstream — Oracle renamed/replaced it with python-oracledb. Use it instead (Flet now supports it on both Android and iOS) and its default thin mode is pure-Python (Ora…