data-diff does not work on M1 Mac for Oracle driver
Describe the bug When running an oracle connection on M1 mac. it cannot find the oracle drivers.
ERROR DPI-1047: Cannot locate a 64-bit Oracle Client library: "dlopen(libclntsh.dylib, 0x0001): tried: 'libclntsh.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibclntsh.dylib' (no such file), __main__.py:326
'/Users/koen.vanbesien/.asdf/installs/python/3.10.12/lib/libclntsh.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/koen.vanbesien/.asdf/installs/python/3.10.12/lib/libclntsh.dylib' (no
such file), '/opt/homebrew/lib/libclntsh.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/lib/libclntsh.dylib' (no such file),
'/Users/koen.vanbesien/.asdf/installs/python/3.10.12/lib/libclntsh.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/koen.vanbesien/.asdf/installs/python/3.10.12/lib/libclntsh.dylib' (no
such file), '/opt/homebrew/lib/libclntsh.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/lib/libclntsh.dylib' (no such file),
'/Users/koen.vanbesien/.asdf/installs/python/3.10.12/lib/libclntsh.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/koen.vanbesien/.asdf/installs/python/3.10.12/lib/libclntsh.dylib' (no
such file), '/opt/homebrew/lib/libclntsh.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/lib/libclntsh.dylib' (no such file),
'/Users/koen.vanbesien/.asdf/installs/python/3.10.12/lib/libclntsh.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Users/koen.vanbesien/.asdf/installs/python/3.10.12/lib/libclntsh.dylib' (no
such file), '/opt/homebrew/lib/libclntsh.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/lib/libclntsh.dylib' (no such file), '/opt/homebrew/lib/libclntsh.dylib' (no such file),
'/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/lib/libclntsh.dylib' (no such file), '/usr/lib/libclntsh.dylib' (no such file, not in dyld cache), 'libclntsh.dylib' (no such file),
'/usr/local/lib/libclntsh.dylib' (no such file), '/usr/lib/libclntsh.dylib' (no such file, not in dyld cache)". See https://cx-oracle.readthedocs.io/en/latest/user_guide/installation.html for help
Describe the environment
Mac M1 Ventura 13.4
** Solution **
Adapt the oracle.py file with the proposed changes here
https://python-oracledb.readthedocs.io/en/latest/user_guide/appendix_c.html#steps-to-upgrade-to-python-oracledb
I edited it like this and it worked
@import_helper("oracle")
def import_oracle():
#import cx_Oracle
import oracledb as cx_Oracle
return cx_Oracle`
Not sure if you can add this by default to the oracle.py driver?
@koenvb could you open a PR with your proposed change?
Hi @koenvb,
I'm sorry for the delay in following up on this. Thank you for taking the time to raise this issue!
We made a hard decision to sunset the data-diff package and won't provide further development or support.
Data diffing continues to be provided and has evolved in the Datafold Cloud.
-Gleb