calling python modules that matlab can't import

15 vues (au cours des 30 derniers jours)
Erik
Erik le 4 Juin 2015
Réponse apportée : Erik le 4 Juin 2015
i'm the author of this SO question. the problem came down to needing python libraries (PIL, opencv, scipy) that either:
  • depend on later versions of libraries than matlab ships (libtiff.5.dylib, libgfortran.3.dylib), or
  • include identifiers starting with underscore (_), which i guess matlab doesn't allow (why?)
what options do i have for how to proceed?
i'm guessing that attempting to compile PIL/opencv/scipy against matlab's libraries would be extremely painful.
i've found the following 3rd party python-from-matlab bridges -- is this my best route?
  • matpy -- numpy.ndarray integration
  • pymex -- numpy.ndarray integration, less recent development, but also looks good
  • pythoncall -- even older, looks less polished
  • wormholes -- also old, ndarray's only, bidirectional over TCP
are there others to consider? opinions/experience on which is most promising for this scenario? i'm guessing matpy...

Réponse acceptée

Erik
Erik le 4 Juin 2015
this solves it:
~$ DYLD_INSERT_LIBRARIES=/opt/local/lib/libgcc/libgfortran.3.dylib:/opt/local/lib/libtiff.5.dylib /Applications/MATLAB_R2015a.app/bin/matlab

Plus de réponses (0)

Catégories

En savoir plus sur Call Python from MATLAB dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by