python-cx_Oracle icon indicating copy to clipboard operation
python-cx_Oracle copied to clipboard

Error: DPI-1047 using Instant Client on macOS Catalina 10.15

Open nchillal opened this issue 7 years ago • 63 comments

I recently upgrade my mac to Mac OS Catalina Beta version. After that cx-Oracle is not working. Fails with error message below.

cx_Oracle.DatabaseError: DPI-1047: Cannot locate a 64-bit Oracle Client library: "dlopen(libclntsh.dylib, 1): image not found". See https://oracle.github.io/odpi/doc/installation.html#macos for help

Version Python 3.7.4 cx-Oracle 7.2.0

This looks to me due to Apple dropping support of 32-bit apps. Can you confirm?

nchillal avatar Aug 01 '19 17:08 nchillal

Did you install a 64-bit Oracle Instant Client? If you were running a 32-bit Python installation before the upgrade, the answer is probably no. :-) You'll need to do that, especially if macOS no longer has a 32-bit Python installation available for you to use! And 64-bit is a good idea in any case!

anthony-tuininga avatar Aug 01 '19 17:08 anthony-tuininga

Yes i did install 64-bit client. I have also reinstall just to make sure using below link.

https://download.oracle.com/otn/mac/instantclient/181000/instantclient-basic-macos.x64-18.1.0.0.0.zip

W.r.t python its 64-bit.

I have following under ~/lib

libclntsh.dylib.18.1 -> ${HOME}/Downloads/instantclient_18_1/libclntsh.dylib.18.1 libclntshcore.dylib.18.1 -> ${HOME}/Downloads/instantclient_18_1/libclntshcore.dylib.18.1 libons.dylib -> ${HOME}/Downloads/instantclient_18_1/libons.dylib libnnz18.dylib -> ${HOME}/Downloads/instantclient_18_1/libnnz18.dylib libociei.dylib -> ${HOME}/Downloads/instantclient_18_1/libociei.dylib

Screen Shot 2019-08-01 at 11 17 38 AM

Note: everything was working fine before upgrading to mac os catalina.

nchillal avatar Aug 01 '19 18:08 nchillal

I don't own a machine running macOS, so I can't help directly. Perhaps @cjbj who does own a machine running macOS can help more.

Did you look at the cx_Oracle installation documentation? Take note of the first paragraph in that section.

anthony-tuininga avatar Aug 01 '19 18:08 anthony-tuininga

Yes i have followed installation documention. It worked before i installed Mac OS Catalina.

nchillal avatar Aug 01 '19 20:08 nchillal

Which Python are you actually using? What is the output of which python ?

cjbj avatar Aug 01 '19 21:08 cjbj

I use python3. I don't use the built python version. Python3 is installed by homebrew package.

➜ brew list python /usr/local/Cellar/python/3.7.4/bin/2to3 /usr/local/Cellar/python/3.7.4/bin/2to3-3.7 /usr/local/Cellar/python/3.7.4/bin/easy_install-3.7 /usr/local/Cellar/python/3.7.4/bin/idle3 /usr/local/Cellar/python/3.7.4/bin/idle3.7 /usr/local/Cellar/python/3.7.4/bin/pip3 /usr/local/Cellar/python/3.7.4/bin/pip3.7 /usr/local/Cellar/python/3.7.4/bin/pydoc3 /usr/local/Cellar/python/3.7.4/bin/pydoc3.7 /usr/local/Cellar/python/3.7.4/bin/python3 /usr/local/Cellar/python/3.7.4/bin/python3-config /usr/local/Cellar/python/3.7.4/bin/python3.7 /usr/local/Cellar/python/3.7.4/bin/python3.7-config /usr/local/Cellar/python/3.7.4/bin/python3.7m /usr/local/Cellar/python/3.7.4/bin/python3.7m-config /usr/local/Cellar/python/3.7.4/bin/pyvenv /usr/local/Cellar/python/3.7.4/bin/pyvenv-3.7 /usr/local/Cellar/python/3.7.4/bin/wheel3 /usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/ (2914 files) /usr/local/Cellar/python/3.7.4/IDLE 3.app/Contents/ (8 files) /usr/local/Cellar/python/3.7.4/lib/pkgconfig/ (3 files) /usr/local/Cellar/python/3.7.4/libexec/bin/ (7 files) /usr/local/Cellar/python/3.7.4/libexec/pip/ (699 files) /usr/local/Cellar/python/3.7.4/libexec/setuptools/ (346 files) /usr/local/Cellar/python/3.7.4/libexec/wheel/ (38 files) /usr/local/Cellar/python/3.7.4/Python Launcher 3.app/Contents/ (16 files) /usr/local/Cellar/python/3.7.4/share/man/ (2 files)

nchillal avatar Aug 01 '19 21:08 nchillal

What does which python show or how do you know you are running the brew python?

Does SQL*Plus work?

cjbj avatar Aug 01 '19 22:08 cjbj

➜ head -1 $HOME/my_script.py #!/usr/bin/env python3

➜ which python /usr/bin/python

Note: This was working before in Mac OS Mojave after i upgrade to Mac OS Catalina Beta its not working.

nchillal avatar Aug 02 '19 00:08 nchillal

Does SQL*Plus work? There have been several macOS versions in the past that broke Oracle client tools.

cjbj avatar Aug 02 '19 00:08 cjbj

Reading the message buried the screenshot (reminder to everyone: don't use screenshots!) It rang a bell with:

  • https://www.reddit.com/r/virtualbox/comments/bjwwvd/virtualbox_in_macos_mojave_10145_beta_4/
  • https://forums.virtualbox.org/viewtopic.php?f=8&t=84092&p=448559#p448559

I don't have any other info at the moment specific to Instant Client.

cjbj avatar Aug 02 '19 01:08 cjbj

Does SQL*Plus work? There have been several macOS versions in the past that broke Oracle client tools.

I have not tried it. Will try and let you know.

nchillal avatar Aug 02 '19 16:08 nchillal

Hmm. Notarization: https://developer.apple.com/documentation/security/notarizing_your_app_before_distribution

cjbj avatar Aug 06 '19 00:08 cjbj

Latest release of catalina has fixed this issue.

nchillal avatar Aug 16 '19 04:08 nchillal

@nchillal thanks for checking.

cjbj avatar Aug 16 '19 04:08 cjbj

Latest release of catalina has fixed this issue.

it's not solved, I have the final version and of Catalina, cx-oracle and instant client and it's not working

rrezino avatar Oct 09 '19 14:10 rrezino

@rrezino sorry to hear that. What version of Instant Client did you try?

For various reasons, the group looking after the macOS Instant Client were not able to test pre-release Catalina before they shipped Instant Client 19.3 (so this is officially supported on Mojave and High Sierra, as noted in the install instructions). I understand any extra certification (notarization?) or packaging changes isn't going to be soon, and involves more than technical considerations.

cjbj avatar Oct 09 '19 22:10 cjbj

Mac = Catalina Oracle instant client = 19.3 Cx_oracle = 7.2.3

rrezino avatar Oct 10 '19 13:10 rrezino

Yep getting this too

olly-writes-code avatar Oct 10 '19 22:10 olly-writes-code

What a pain. We had something similar back in the 11 timeframe when Apple broke compatibility. To be straightforward, I'm told there won't be any rebuilt/updated IC packages in the near term. Start looking for workarounds. I've yet to get my hands on Catalina.

cjbj avatar Oct 10 '19 22:10 cjbj

image

I have the same setup as @rrezino. OS = Catalina 10.15 (19A583) Oracle instant client = 19.3 Cx_oracle = 7.2.3

olly-writes-code avatar Oct 10 '19 23:10 olly-writes-code