Caché-Python Binding doesn't work

Beginner, Caché, Python

Hello,

I'm trying to set Caché-Python Binding on Mac, but there is a problem.

I performed installation and configuration of Caché-Python binding module based on the manual (URL)
including setting of PATH and LD_LIBRARY_PATH in "bash_profile", 
and they seems to be done successfully (there was no error in the process).

However, when I execute test python file (test.py), it failed with error massage as below.
-----------------------Error Massage----------------------
Traceback (most recent call last):
  File "test.py", line 2, in <module>
    import intersys.pythonbind3
  File "/$USER$/.pyenv/versions/anaconda3-4.3.1/envs/py3.6.0/lib/python3.6/site-packages/pythonbind3-1.0-py3.6-macosx-10.7-x86_64.egg/intersys/pythonbind3.py", line 1, in <module>
    import intersys.pythonbind31
ImportError: dlopen(/$USER$/.pyenv/versions/anaconda3-4.3.1/envs/py3.6.0/lib/python3.6/site-packages/pythonbind3-1.0-py3.6-macosx-10.7-x86_64.egg/intersys/pythonbind31.cpython-36m-darwin.so, 2): Library not loaded: @executable_path/libcbind.dylib
  Referenced from: /$USER$/.pyenv/versions/anaconda3-4.3.1/envs/py3.6.0/lib/python3.6/site-packages/pythonbind3-1.0-py3.6-macosx-10.7-x86_64.egg/intersys/pythonbind31.cpython-36m-darwin.so
  Reason: image not found
---------------------------------------------------------------

None of the things I have searched doesn't work in my case.

It would be appreciated if you could share a good idea or solution.
Thank you for in advance.

FYI: my development environment is as below:

  • Machine / OS:          MacBook Pro / MacOS High Sierra (ver.10.13.6)
  • Python version:       3.6.0 (installed via Anaconda) 

    *I used "setup3.py" file in the binding module installation because of the Python version

  • Caché version:         2017.2 (evaluation edition)
  • 0
  • 0
  • 299
  • 1
  • 2

Answers

Hi Tosh,

it seems your path is not correctly setup as the process is not able to identify the underlying C binding libraries. I assume you are using the 64-bit version of Python. Also I want to point out that we currently only support Python 3 up to version 3.3 as later versions introduced quite significant changes in string handling. We are working on supporting versions beyond 3.3 at the moment.

HTH,

Stefan

Hi Stefan,

I really appreciate your valuable advice.
I’ve downgraded Python to 3.3 right way.

However, the problem haven’t been solved yet at this time.
As you pointed out, I also suspect the PATH of C binding library “libcbind.dylib” cannot be identified.

Actually, the 64bit version of Python is installed in my machine, but the installed Cache version is also 64bit.
I think this should work....

I've double-checked ~/.bash_profile, where I set PATHs, but I don't know what is wrong.
Would it be possible to provide me with additional advice  if there are any points to be reviewed in the “~/.bash_profile” below?

------------------------~/.bash_profile---------------------------
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
export PATH=/$USER$/InterSystems/Cache/bin:$PATH
export DYLD_LIBRARY_PATH=/$USER$/InterSystems/Cache/bin:$DYLD_LIBRARY_PATH
------------------------------------------------------------------------------

It would be really appreciated if you could provide me with additional advice.

Thank you for your support.