[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[python #NMB-445318]: pygrib installing question on Windows


So a couple things:

1.  On the box where you were able to download eccodes from Anaconda and 
install manually...could you try doing that with pygrib as well and avoid 

2. As far as building pygrib, I don't think you actually need to do any 
building/linking against png/jasper/openjpeg for the interface where all you're 
doing is:

    import pygrib

For that interface, based on my testing, all you need is to have eccodes 
compiled/linked against openjpeg/jasper and/or png (and even those are only to 
support GRIB using special compression methods). I actually have an open issue 
on pygrib about this (well, compiling again openjpeg):


As far as I can tell, pygrib is only building itself against jasper, etc. to 
use g2clib, which is only needed for `ncepgrib2`, which I'm not sure you need?

My advice would be to build pygrib itself only against your copy of eccodes 
(skipping jpeg and png). If it builds, I'd see if it complains when you try to 
open your GRIB files.


> Ok, so I was able to make some progress. Looks like there's some difficulties 
> on my end with the latest version of Conda installing packages from the web. 
> But, if I download and then install eccodes from a local file, I'm able to 
> get that far. I followed the instructions for editing setup.cfg in pygrib and 
> I'm getting errors on running setup.py. It appears that it's an issue with 
> the jasper library, as it's having issues with linking enc_jpeg2000.lib and 
> dec_jpeg2000.lib on the build/install process.
> Iâm running windows 7 for this project. Iâm concurrently attempting to 
> install eccodes and pygrib on my new windows 10 box as well; I was able to 
> successfully compile eccodes from the conda-forge source using Cygwin 
> yesterday. I have not yet attempted to install pygrib on the windows 10 box.
> Below is the tail end of my command prompt from running pygribâs setup.py:
> [cid:address@hidden
> This project is one of my very first forays into reading c code, so I donât 
> have a firm grasp on what Iâm doing here. I was able to find the 
> enc_jpeg2000.c and dec_jpeg2000.c files in the pygrib g2clib_src folder, but 
> I have no idea how to resolve the error. What I currently understand from the 
> error Iâm getting and looking at those 2 .c files is that there are 
> declared functions for jpc_encode and jpc_decode, but I canât seem to find 
> the definitions in any header/.h files.
> Taking a closer look, it seems as though whatever version of Jasper I 
> installed (pretty sure itâs from conda-forge) doesnât have the jpc_encode 
> and jpc_decode functions defined. What versions of the image libraries are 
> you currently using?

Ticket Details
Ticket ID: NMB-445318
Department: Support Python
Priority: Low
Status: Closed
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.