[SciPy-user] Help with Scientific's NetCDF[SEC=UNCLASSIFIED]

Scott Collis s.collis@bom.gov...
Wed Apr 23 18:57:51 CDT 2008


Absolutely wonderful.
Worked a treat!

Thanks!
On Wed, 2008-04-23 at 18:52 -0500, Robert Kern wrote:
> On Wed, Apr 23, 2008 at 6:43 PM, Scott Collis <s.collis@bom.gov.au> wrote:
> > Ok, I know this is not strictly SciPy, being from the Scientific
> >  Branch... But I was hoping some one might know...
> >
> >  I have been able to get the Scientific.IO.NetCDF library working on
> >  other machines but trying to install it, as a user (no root access...)
> >  on a cluster machine here I get the following error:
> >  >>> import Scientific.IO.NetCDF
> >  Traceback (most recent call last):
> >   File "<stdin>", line 1, in ?
> >   File
> >  "/flurry/home/scollis/pylibs/lib64/python2.4/site-packages/Scientific/IO/NetCDF.py", line 165, in ?
> >     from Scientific_netcdf import *
> >  ImportError: libnetcdf.so.4: cannot open shared object file: No such
> >  file or directory
> >
> >  now I have found where libnetcdf.so.4 is located and I have added that
> >  to sys.path {sys.path.append("/usr/local/netcdf-3.6.2a/lib/")} I have
> >  tried assing said directory to PYTHONPATH (export
> >  PYTHONPATH="/usr/local/netcdf-3.6.2a/lib/")
> 
> Both of those are for loading Python modules, not linking non-python
> shared libraries. Instead, you need to set the environment variable
> LD_LIBRARY_PATH. Note that you must set this variable before the
> python executable even starts; you cannot add it inside your code with
> os.putenv().
> 


More information about the SciPy-user mailing list