NCAR / pyngl

Other
138 stars 30 forks source link

Import Ngl error #23

Open jfowler9 opened 5 years ago

jfowler9 commented 5 years ago

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.

KMFleischer commented 5 years ago

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

jfowler9 commented 5 years ago

Hi Karin,

I uninstalled Anaconda, did a fresh install of minicondas then typed;

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

I still get the same error when I test with “import Ngl”. The version of gfortran library installed is libgfortran-4.0.0. Before proceeding with the install I got this; libgfortran conda-forge/osx-64::libgfortran-4.0.0-2

Isn’t the error indicating pyngl is looking for libgfortran-3?

I also tried: conda install -n pyn_env -c conda-forge gfortran

But got this error; PackagesNotFoundError: The following packages are not available from current channels:

Thank you for your help, Jen

On Oct 18, 2019, at 10:10 AM, Karin Meier-Fleischer notifications@github.com<mailto:notifications@github.com> wrote:

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/NCAR/pyngl/issues/23?email_source=notifications&email_token=ANQFX5USZIAHMVEGPIIZ3O3QPHNV3A5CNFSM4JBNUARKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBU7DHI#issuecomment-543814045, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANQFX5QRSOLP4JY2TOADV5LQPHNV3ANCNFSM4JBNUARA.

jfowler9 commented 5 years ago

Hello,

I solved my problem. I had to force the install for gfortan 3;

conda create -n new_environment --channel conda-forge pynio pyngl libgfortran=3

And I had to install XQuartz on my Mac. Now everything is running smoothly.

Thank you, Jen

On Oct 18, 2019, at 10:10 AM, Karin Meier-Fleischer notifications@github.com<mailto:notifications@github.com> wrote:

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/NCAR/pyngl/issues/23?email_source=notifications&email_token=ANQFX5USZIAHMVEGPIIZ3O3QPHNV3A5CNFSM4JBNUARKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBU7DHI#issuecomment-543814045, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANQFX5QRSOLP4JY2TOADV5LQPHNV3ANCNFSM4JBNUARA.

linlintamu commented 4 years ago

Thank you!

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

RuralBee commented 4 years ago

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 4 years ago
  1. locate libgfortran.4.dylib
  2. ln -s $PATH_libgfortran.4.dylib ~/Applications/miniconda3/lib/