For python install hdf5 / netcdf4

Doing this on Linux Mint 17.1.

When I try:

pip install hdf5

I get an error

"Could not find a version that satisfies the requirement hdf5 (from versions: ) No matching distribution found for hdf5"

I end up trying to install netcdf4, but can't do it until I install hdf5. Presumably since I tried to do this last week, with netcdf4, I have to use pip install netcdf4, err hdf5 ... at least, possibly in the case of hdf5.

If I try pip install h5py, I get a message:

Requirement already satisfied (use --upgrade to upgrade): h5py in ./anaconda3/lib/python3.5/site-packages Requirement already satisfied (use --upgrade to upgrade): numpy>=1.6.1 in ./anaconda3/lib/python3.5/site-packages (from h5py) Requirement already satisfied (use --upgrade to upgrade): six in ./anaconda3/lib/python3.5/site-packages (from h5py)

But if I go ahead and try pip install netcdf4, he will appear and say:

Collecting netcdf4 Using cached netCDF4-1.2.3.1.tar.gz Complete output from command python setup.py egg_info: Package hdf5 was not found in the pkg-config search path. Perhaps you should add the directory containing hdf5.pc "environment variable PKG_CONFIG_PATH Package 'hdf5' not found cython version 0.23.4 found ... reading from setup.cfg ...

HDF5_DIR environment variable not set, checking some standard locations ..
checking /home/meant2b ...
checking /usr/local ...
checking /sw ...
checking /opt ...
checking /opt/local ...
checking /usr ...
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/tmp/pip-build-pq3yt4ek/netcdf4/setup.py", line 286, in <module>
    raise ValueError('did not find HDF5 headers')
ValueError: did not find HDF5 headers

----------------------------------------

The python setup.py egg_info command failed with error code 1 in / tmp / pip -build-pq3yt4ek / netcdf4 / `

, hdf5.pc.

h5py hdf5? hdf5 pip.

, hdf5, netcdf4?

+4
2

HDF5 Linux. Ubuntu :

sudo apt-get install libhdf5-serial-dev netcdf-bin libnetcdf-dev

.

+2

Debian 8. , root, include hdf5, HDF_DIR netCDF4:

# apt-get install -y libhdf5-dev libnetcdf-dev
# ln -s /usr/include/hdf5/serial /usr/include/hdf5/include
# export HDF5_DIR=/usr/include/hdf5
# pip install netCDF4
0

All Articles