[pyngl-talk] Importing PyNIO from a conda install

David Brown dbrown at ucar.edu
Mon Mar 14 22:19:06 MDT 2016


The standard way to import PyNIO is simply:

import Nio

f = Nio.open_file(<filename>)

Let us know if that doesn't work.
 -dave





On Mon, Mar 14, 2016 at 9:10 PM, Ray Hawthorne <frontogenesis at gmail.com> wrote:
> Greetings,
>
> I just installed PyNIO from anaconda and I’m having some trouble reading in a grib2 file.
>
> Using the documentation, when I do an import into my Python script:
> import Nio
>
> The import fails to occur.
>
> I dug around in the anaconda subdirectories and tried:
> import PyNIO
> And that import statement works just fine.
>
> However, when I go to open a grib file:
> f = Nio.open_file("href.t06z.prob.f36.grib2”)
> I end up getting a traceback.
>
> (Similar issue with importing PyNio.Nio as Nio)
>
> I suspect there’s a discrepancy between the documentation and the build of PyNIO from anaconda — but I’m somewhere in the advanced beginner stage when it comes to Python in general, so I’m not sure how I might be able to fix this so that I can open the grib file with pynio.  Would someone be able to point me in the right direction?
>
> Thanks,
>
> Ray Hawthorne
> _______________________________________________
> pyngl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/pyngl-talk


More information about the pyngl-talk mailing list