Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

environment variable NETCDF4_DIR ignored #51

Closed
dopplershift opened this issue Feb 26, 2014 · 4 comments
Closed

environment variable NETCDF4_DIR ignored #51

dopplershift opened this issue Feb 26, 2014 · 4 comments

Comments

@dopplershift
Copy link
Member

From elbueler...@gtempaccount.com on May 20, 2010 13:48:00

What steps will reproduce the problem? 1. SEE BELOW FOR TRANSCRIPT 2. 3. What is the expected output? What do you see instead? What version of the product are you using? On what operating system? ubuntu 10.04: have packages
libnetcdf4
libnetcdf-dev
libhdf5-openmpi-1.8.4
libhdf5-openmpi-dev Please provide any additional information below. bueler@bueler-pogo:/usr/local/netCDF4-0.9.1$ locate libnetcdf.so.4
/usr/lib/libnetcdf.so.4
/usr/lib/libnetcdf.so.4.0.0
bueler@bueler-pogo:
/usr/local/netCDF4-0.9.1$ export NETCDF4_DIR=/usr/lib
bueler@bueler-pogo:/usr/local/netCDF4-0.9.1$ echo $NETCDF4_DIR
/usr/lib
bueler@bueler-pogo:
/usr/local/netCDF4-0.9.1$ sudo python setup.py install

HDF5_DIR environment variable not set, checking some standard locations ..,
checking /home/bueler ...
checking /usr/local ...
checking /sw ...
checking /opt ...
checking /opt/local ...
checking /usr ...
HDF5 found in /usr

NETCDF4_DIR environment variable not set, checking some standard locations ..,
checking /home/bueler ...
checking /usr/local ...
checking /sw ...
checking /opt ...
checking /opt/local ...
checking /usr ...
Traceback (most recent call last):
File "setup.py", line 68, in
raise ValueError('did not find netCDF version 4 headers and libs')
ValueError: did not find netCDF version 4 headers and libs

Original issue: http://code.google.com/p/netcdf4-python/issues/detail?id=51

@dopplershift
Copy link
Member Author

From whitaker.jeffrey@gmail.com on May 20, 2010 12:54:58

Environment variables are not passed to sudo by default. You need to do

sudo env=NETCDF4_DIR python setup.py install

@dopplershift
Copy link
Member Author

From elbueler...@gtempaccount.com on May 20, 2010 13:28:39

That didn't work either.

These instructions in INSTALL are pretty much nonsensical to debian users:

"""
make sure numpy (at least version 1.2.1) is installed.
make sure HDF5 (at least version 1.8.4) and netcdf-4 (at least version 4.1)
are installed.
'python setup.py install' installs the netCDF4 and netcdftime modules.
The environment variables HDF5_DIR and NETCDF4_DIR can be
set to point to the locations of the HDF5 and netcdf-4 libraries and
headers before setup.py is run. If they are not, some standard locations
will be searched.
"""

Apparently what you mean is something like this:

"""
Install the libnetcdf4 package which is really netcdf 3.6.3 and does not depend on
HDF5 and is not netcdf-4. Then do
$ sudo bash
$ export NETCDF3_DIR=/usr
$ python setup-nc3.py install
"""

Odd that /usr is not tried as one of the possibilities.

Basically debian users needing the netCDF3 python module have to use libnetcdf4 and
netcdf4-python, and then ignor most of the install instructions. Very odd.

@dopplershift
Copy link
Member Author

From whitaker.jeffrey@gmail.com on May 20, 2010 14:19:00

The netCDF3 module is just a hack for those that can't (or won't) install new versions of netcdf-4/hdf5. the
netCDF4 module works fine for netcdf3 formatted files. You should be able to just do

sudo bash
export NETCDF4_DIR=<path to netCDF 4 lib>
export HDF5_DIR=
python setup.py install

which is pretty much exactly what the install instructions say.

@dopplershift
Copy link
Member Author

From whitaker.jeffrey@gmail.com on February 25, 2014 18:04:09

Status: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant