bastibe / transplant

Transplant is an easy way of calling Matlab from Python
https://transplant.readthedocs.io
Other
110 stars 26 forks source link

Finding libzmq for Matlab #40

Closed tsdev closed 7 years ago

tsdev commented 7 years ago

The search for the location of libzmq fails. Most probably because on my platform (OSX, python installed with homebrew) the sys.prefix() call returns: '/usr/local/Cellar/python3/3.6.0/Frameworks/Python.framework/Versions/3.6'

And transplant searches for libzmq in this path instead of in /usr/local as it should be.

bastibe commented 7 years ago

As per man dlopen, libraries on macOS are searched in:

Why do you say that libzmq should be located in /usr/local? It would be easy enough to add this directory to the search list (transplant_master.py:554), but on my machine, /usr/local does not contain a single library.

bastibe commented 7 years ago

What version of macOS are you running? Can you check in your man dlopen if it says something different to what I outlined above?

tsdev commented 7 years ago

It works! My libzmq installation was wrong. However I would like to able to switch off the search for libzmq. Since I am using transplant to communicate with a compiled Matlab code which already contains the library, libzmq.dylib library is not necessary for the Matlab code to run. Would it be possible to add this extra option?

bastibe commented 7 years ago

I think you still need libzmq for the Python side? I'm actually not entirely sure if pyzmq uses the system libzmq. If you manually disable the search and delete/move libzmq, does Transplant still work?

tsdev commented 7 years ago

I checked the documentation of pyzmq and it seems it needs the libzmq library to run. I will try to test this on a clean system.