NCAR/pyngl

Import Ngl error

Opened this issue · 6 comments

I installed pyNGL (version 1.6.1) onto my Mac (OS 10.14.6) using the following commands:

conda create --name pyn_env --channel conda-forge pynio pyngl
source activate pyn_env

I then tested pyNGL and pyNIO;

import Nio
import Ngl

pyNio is fine, but I got the following error with pyNGL;

ImportError: dlopen(/Users/jen/anaconda3/envs/pyn_env/lib/python3.7/site-packages/ngl/fplib.cpython-37m-darwin.so, 2): Library not loaded: @rpath/libgfortran.3.dylib
Referenced from: /Users/jen/anaconda3/envs/pyn_env/lib/python3.7/site-packages/ngl/fplib.cpython-37m-darwin.so
Reason: image not found

Can you help me with this error? Thank you.

Hi,

I've installed the software like you did with minicondas conda for python 3.7 on may mac (OsX 10.14.6), and everythings works fine.

The error message is saying that the gfortran library is not installed in your pyn_env environment, maybe you can install it manually with 'conda install -n pyn_env -c conda-forge gfortran'.

-Karin

Thank you!

It is very tricky that you have to download gfortran on your own and add it to your anaconda/lib.

I via

Hi,

I've installed the software like you did with minicondas conda for python 3.7 on may mac (OsX 10.14.6), and everythings works fine.

The error message is saying that the gfortran library is not installed in your pyn_env environment, maybe you can install it manually with 'conda install -n pyn_env -c conda-forge gfortran'.

-Karin

Hi Karin,
I have the same issue,I via "conda install -c uvcdat gfortran" installed gfortran, but the issue still is
portError: dlopen(/Users/CJB/opt/miniconda3/envs/ncl_py/lib/python3.7/site-packages/ngl/fplib.cpython-37m-darwin.so, 2): Library not loaded: @rpath/libgfortran.4.dylib
Referenced from: /Users/CJB/opt/miniconda3/envs/ncl_py/lib/python3.7/site-packages/ngl/fplib.cpython-37m-darwin.so
Reason: image not found
I am excepting your promote reponse, if it is convenient for you

lj-mu commented
  1. locate libgfortran.4.dylib
  2. ln -s $PATH_libgfortran.4.dylib ~/Applications/miniconda3/lib/