Hello, I have a functional PyFerret 7.4 on Mac OS X Sierra, with python 3.7 from HomeBrew. I'm now trying to use jupyter notebook and the ferretmagic module from Patrick (https://github.com/PBrockmann/ipython_ferretmagic) What I get is : import pyferret --------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-12-1563948a3fc8> in <module>() ----> 1 import pyferret 43 import readline 44 ---> 45 from pyferret import libpyferret 46 # also import everything (not starting with an underscore) from libpyferret 47 # so constants in that module are seen as part of this module ImportError: dlopen(/Users/marti/local/softs/PyFerret7.4_python3.7/lib/python3.7/site-packages/pyferret/libpyferret.cpython-37m-darwin.so, 2): Library not loaded: /Users/ksmith/.local/opt/gcc/lib/gcc/8/libgfortran.5.dylib Referenced from: /Users/marti/local/softs/PyFerret7.4_python3.7/lib/python3.7/site-packages/pyferret/libpyferret.cpython-37m-darwin.so Reason: image not found It means that python does not find libgfortran.5.dylib in any known path, and tries to load the default /Users/ksmith/.local/opt/gcc/lib/gcc/8/libgfortran.5.dylib hardwired in the pyferret library. When launching pyferret from the shell, you have to set the environment variable DYLD_FALLBACK_LIBRARY_PATH to make pyferret available to find libgfortran.5.dylib. I can't find a way to do that in a jupyter notebook : Environment variables from the shell (PYTHONPATH, DYLD_FALLBACK_LIBRARY_PATH) are not recognized by jupyter. Setting <
|