[pyngl-talk] Help with PyNIO installation
hallock at ucar.edu
Wed Dec 7 12:37:03 MST 2016
Is there any chance you could possibly use Anaconda/Miniconda on these virtual machines instead of Enthought Canopy? As far as I am aware, there is no easy way for us to create and distribute a version of our software that is built against Enthought Canopy’s libraries.
However, we do have up-to-date versions PyNGL and PyNIO (and NCL) available on the "conda-forge” Anaconda channel, which also hosts many other commonly used scientific packages (including pygrib!). Unfortunately, Anaconda and Enthought Canopy may not be compatible; in order for Anaconda to work properly, its provided python needs to be the “default” python.
We have information regarding the installation of Anaconda/Miniconda on the PyNGL/PyNIO download page: https://www.pyngl.ucar.edu/Download/ <https://www.pyngl.ucar.edu/Download/>
In order to use the recommended "conda-forge" versions (different from the example on the linked page), create a conda environment using a command such as:
conda create --name <env_name> --channel conda-forge pynio pyngl
and then activate the environment:
source activate <env_name>
Note that “<env_name>” can be whatever you would like your conda environment to be named; for example, the linked documentation above uses “pyn_test”.
If using Anaconda/Miniconda is not possible, then we will have to further troubleshoot building PyNIO from source code.
Please let us know if this information helps!
> On Dec 6, 2016, at 12:38 PM, Fan, Xingang <xingang.fan at wku.edu> wrote:
> I am using Enthought Canopy as my default python. I would like to get PyNIO and PyNGL installed.
> I have tried to download the prebuilt binaries, none of them work for my Ubuntu environment (I have to use the VirtualBox and have a Virtual Machine of Ubuntu system on my windows machines for our classroom use, because I wanted to have pygrib, PyNIO, and PyNGL). Although the prebuilt packages worked for my MacBook Pro, where the Canopy was also installed.
> Then I had to try to install from the source code of PyNIO. I have followed the instructions online at https://www.pyngl.ucar.edu/Download/build_pynio_from_src.shtml <https://www.pyngl.ucar.edu/Download/build_pynio_from_src.shtml#HDF4>.
> And all non-optional packages have been installed without problem. However, when I get down to install PyNIO, it seemed installed, but the import Nio showed the following error messages:
> import Nio
> ImportError Traceback (most recent call last)
> <ipython-input-1-d77b80fd2dfc> in <module>()
> ----> 1 import Nio
> /home/xfan/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/PyNIO/Nio.py in <module>()
> 61 '''
> ---> 63 from nio import *
> 64 from nio import _C_API
> ImportError: /home/xfan/Canopy/appdata/canopy-22.214.171.12448.rh5-x86_64/lib/libgfortran.so.3: version `GFORTRAN_1.4' not found (required by /home/xfan/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/PyNIO/nio.so)
> PLEASE help see what's the problem. While installing, I have the following environment variables set:
> export HAS_NETCDF4=1
> export HAS_HDF5=1
> export NETCDF_PREFIX=/usr/local
> export F2CLIBS=gfortran
> export F2CLIBS_PREFIX=/usr/lib/x86_64-linux-gnu
> Xingang Fan, Ph. D., | Department of Geography and Geology
> Associate Professor | Western Kentucky University
> of Meteorology | 1906 College Heights Blvd., #31066
> 270-745-5980 | Bowling Green, KY 42101-1066
> xingang.fan at wku.edu <mailto:xingang.fan at wku.edu>
> http://people.wku.edu/xingang.fan <http://people.wku.edu/xingang.fan>_______________________________________________
> pyngl-talk mailing list
> List instructions, subscriber options, unsubscribe:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the pyngl-talk