Re: ImportError: No module named nio

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Fri Sep 28 2012 - 13:29:44 MDT

Hi Saulo,

My understanding concerning szip is that, although the HDF people allow it as an option, NetCDF officially does not support it because it is encumbered with patents and not completely open source. Also having an optional compression package would mean that the NetCDF format would become less universally accessible. I doubt that it will ever be used much for NetCDF files.

I do not have a good answer at the moment for why your PyNIO installation is not working. We will look into it, and hopefully a solution will emerge soon.
 -dave

On Sep 27, 2012, at 6:08 PM, Saulo Soares wrote:

> Hi,
>
> I did a source install of PyNIO on my:
> Linux itamambuca 3.2.0-31-generic #50-Ubuntu SMP Fri Sep 7 16:16:45 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
>
> I used the following C flags:
> declare -x GRIB2_PREFIX="/usr/local"
> declare -x HAS_GDAL="0"
> declare -x HAS_GRIB2="1"
> declare -x HAS_HDF4="1"
> declare -x HAS_HDF5="1"
> declare -x HAS_HDFEOS="0"
> declare -x HAS_HDFEOS5="0"
> declare -x HAS_NETCDF4="1"
> declare -x HAS_SZIP="0"
> declare -x HDF4_PREFIX="/usr/local/hdf4-to-ncl"
> declare -x HDF5_PREFIX="/usr/local/hdf5"
> declare -x NETCDF4_PREFIX="/usr/local/netcdf-4.2.1.1"
> declare -x NETCDF_PREFIX="/usr/local/netcdf-4.2.1.1"
>
> I also have the NCL and NCARG set up.
>
> Note I did disable szip because I compiled by hdf5 and netcdf without it. I manage to compile ncl from source nonetheless.
>
> So, quick first question: I've never dealt with a netcdf file using szip before but should I expect problems, are they going to become standard?
> Netcdf 4 had them (and hdf5 as well) as an optional add on.
>
> Now back to PyNIO:
> After setting those flags, I did:
> python setup.py build (I cannot build as sudo, no environment variables)
> then
> sudo python setup.py install
>
> It seemed to have installed fine:
> $ ll /usr/local/lib/python2.7/dist-packages/PyNIO
> total 5460
> drwxr-sr-x 3 root staff 4096 Sep 27 12:50 ./
> drwxrwsr-x 4 root staff 4096 Sep 27 12:50 ../
> -rw-rw-r-- 1 root staff 10963 Jul 22 2011 alt-setup.py
> -rw-r--r-- 1 root staff 6692 Sep 27 12:50 alt-setup.pyc
> -rw-rw-r-- 1 root staff 47068 Jul 22 2011 coordsel.py
> -rw-r--r-- 1 root staff 35128 Sep 27 12:50 coordsel.pyc
> -rw-rw-r-- 1 root staff 2 Jul 22 2011 __init__.py
> -rw-r--r-- 1 root staff 143 Sep 27 12:50 __init__.pyc
> drwxr-sr-x 3 root staff 4096 Sep 27 12:50 ncarg/
> -rw-rw-r-- 1 root staff 26028 Jul 22 2011 Nio.py
> -rw-r--r-- 1 root staff 21227 Sep 27 12:50 Nio.pyc
> -rwxrwxr-x 1 root staff 5374488 Sep 27 12:47 nio.so*
> -rw-r--r-- 1 root staff 264 Sep 27 12:50 pynio_version.py
> -rw-r--r-- 1 root staff 477 Sep 27 12:50 pynio_version.pyc
> -rw-rw-r-- 1 root staff 11843 Jul 22 2011 _xarray.py
> -rw-r--r-- 1 root staff 10246 Sep 27 12:50 _xarray.pyc
>
> But when I go import the Nio inside python I get:
> >>> import Nio
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "Nio.py", line 63, in <module>
> from nio import *
> ImportError: No module named nio
>
> I'd say its a matter of setting a pythonpath environment variable, but I did similar installs on the dist-packgages (the default actually) and I can always import them. I know I can do:
> >>> import PyNIO
> >>> PyNIO
> <module 'PyNIO' from '/usr/local/lib/python2.7/dist-packages/PyNIO/__init__.pyc'>
>
> But I don't think that is right.
> Help?
>
> Aloha,
>
> Saulo
>
>
> _______________________________________________
> pyngl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/pyngl-talk

_______________________________________________
pyngl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
Received on Fri Sep 28 21:29:51 2012

This archive was generated by hypermail 2.1.8 : Tue Oct 02 2012 - 14:59:57 MDT