Can't Install h5py on Ubuntu 9.10

1,191 views
Skip to first unread message

Mkanyicy

unread,
Feb 16, 2010, 9:34:11 AM2/16/10
to h5py
Hi,

I tried installing h5py using 'easy_install' but I got a huge error
message that is 1500+ lines. Here is the first few lines.

---

Warning: Can't determine HDF5 version, assuming 1.6 (use --api= to
override)
h5py/h5.c:4:20: error: Python.h: No such file or directory
h5py/h5.c:5:26: error: structmember.h: No such file or directory
h5py/h5.c:7:6: error: #error Python headers needed to compile C
extensions, please install development version of Python.
h5py/h5.c:39: error: expected specifier-qualifier-list before
‘PyObject’
In file included from /usr/lib/python2.6/dist-packages/numpy/core/
include/numpy/ndarrayobject.h:61,
from /usr/lib/python2.6/dist-packages/numpy/core/
include/numpy/arrayobject.h:14,
from h5py/compat.h:20,
from h5py/h5.c:140:
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/npy_common.h:
30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘npy_longlong’
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/npy_common.h:
31: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘npy_ulonglong’
In file included from /usr/lib/python2.6/dist-packages/numpy/core/
include/numpy/ndarrayobject.h:61,
from /usr/lib/python2.6/dist-packages/numpy/core/
include/numpy/arrayobject.h:14,
from h5py/compat.h:20,
from h5py/h5.c:140:
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/npy_common.h:
71:2: error: #error Must use Python with unicode enabled.
In file included from /usr/lib/python2.6/dist-packages/numpy/core/
include/numpy/ndarrayobject.h:61,
from /usr/lib/python2.6/dist-packages/numpy/core/
include/numpy/arrayobject.h:14,
from h5py/compat.h:20,
from h5py/h5.c:140:
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/npy_common.h:
267: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘npy_int64’
/usr/lib/python2.6/dist-packages/numpy/core/include/numpy/npy_common.h:
268: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘npy_uint64’

---
How can I fix this?

Andrew Collette

unread,
Feb 16, 2010, 1:28:13 PM2/16/10
to h5...@googlegroups.com
Hi,

> I tried installing h5py using 'easy_install' but I got a huge error
> message that is 1500+ lines. Here is the first few lines.

> h5py/h5.c:4:20: error: Python.h: No such file or directory

It looks like you don't have the "development" version of Python
installed (Ubuntu package "python-dev"). H5py needs the Python
headers in order to compile.

You'll also need:
HDF5 (libhdf5-serial and libhdf5-serial-dev)
NumPy (python-numpy)

Hope this helps,
Andrew

Mkhanyisi Madlavana

unread,
Feb 17, 2010, 3:40:13 AM2/17/10
to h5...@googlegroups.com
Thanks Andrew! That solved the problem! Cheers.


--
You received this message because you are subscribed to the Google Groups "h5py" group.
To post to this group, send email to h5...@googlegroups.com.
To unsubscribe from this group, send email to h5py+uns...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/h5py?hl=en.




--
|%%%
| Mkhanyisi Madlavana
| Square Kilometre Array - South Africa (SKA SA) | http://www.ska.ac.za |
| mmadl...@ska.ac.za | Phone: 021 531 7282 | Mobile: 079 910 1104 |
|%%%

yeom...@gmail.com

unread,
Nov 21, 2013, 3:44:05 AM11/21/13
to h5...@googlegroups.com


在 2010年2月17日星期三UTC+8上午2时28分13秒,Andrew Collette写道:

yeom...@gmail.com

unread,
Nov 21, 2013, 3:48:49 AM11/21/13
to h5...@googlegroups.com

hi dear Andrew, i encounter the similar issue while i tried to install h5py in my Ubuntu(13.10). here is the promlem:
/usr/local/lib/python2.7/dist-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]

 #warning "Using deprecated NumPy API, disable it by " \

  ^

In file included from h5py/defs.c:259:0:

h5py/api_compat.h:22:18: fatal error: hdf5.h: No such file or directory

 #include "hdf5.h"

                  ^

compilation terminated.

error: command 'i686-linux-gnu-gcc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools;__file__='/tmp/pip_build_root/h5py/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-EnzIF1-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip_build_root/h5py
Storing complete log in /home/yeoman/.pip/pip.log 
 i update my python for the development version and tried to compile the source code downloaded from the home of h5py. However, i still can'y fix the problem myself and hence turn the google groups for help.looking for your reply soon.best wishes

在 2010年2月17日星期三UTC+8上午2时28分13秒,Andrew Collette写道:

Andrew Collette

unread,
Nov 21, 2013, 10:44:46 AM11/21/13
to h5...@googlegroups.com
Hi,

> h5py/api_compat.h:22:18: fatal error: hdf5.h: No such file or directory

You will also need to install the HDF5 library; I believe it's called
something like "libhdf5-serial-dev" on Ubuntu.

Andrew

yeom...@gmail.com

unread,
Nov 22, 2013, 3:22:03 AM11/22/13
to h5...@googlegroups.com
yep, i have successfully solved the h5py issue;meanwhile i solve the netC
 DF4 problems as well, thanks a million ,dear andrew.
013年11月21日星期四UTC+8下午11时44分46秒,Andrew Collette写道:

André Ferreira

unread,
Jan 14, 2015, 2:39:24 PM1/14/15
to h5...@googlegroups.com
Thank you so much guys solved my problem too
Reply all
Reply to author
Forward
0 new messages