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

Won't build h5py in Ubuntu 17 #193

Open
wsanders opened this issue May 27, 2017 · 3 comments
Open

Won't build h5py in Ubuntu 17 #193

wsanders opened this issue May 27, 2017 · 3 comments

Comments

@wsanders
Copy link

wsanders commented May 27, 2017

While running "pip install -r requirements.txt". "pip install h5py" worked ok though...

   In file included from /root/git/torch-rnn/.env/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1781:0,
                     from /root/git/torch-rnn/.env/local/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:18,
                     from /root/git/torch-rnn/.env/local/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                     from /tmp/pip-build-2Jd8UA/h5py/h5py/api_compat.h:26,
                     from /tmp/pip-build-2Jd8UA/h5py/h5py/defs.c:279:
    /root/git/torch-rnn/.env/local/lib/python2.7/site-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 /tmp/pip-build-2Jd8UA/h5py/h5py/defs.c:279:0:
    /tmp/pip-build-2Jd8UA/h5py/h5py/api_compat.h:27:18: fatal error: hdf5.h: No such file or directory
     #include "hdf5.h"
                      ^
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    ----------------------------------------
Command "/root/git/torch-rnn/.env/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-2Jd8UA/h5py/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-u0hSCQ-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/git/torch-rnn/.env/include/site/python2.7/h5py" failed with error code 1 in /tmp/pip-build-2Jd8UA/h5py/

The preproessor works OK but train.lua fails, can't find hdf5.h even though is it present in /usr/include/hdf5/serial/hdf5.h:

# th train.lua --input_h5 data/tiny-shakespeare.h5  --input_json data/tiny-shakespeare.json
/root/torch/install/bin/luajit: /root/torch/install/share/lua/5.1/trepl/init.lua:389: /root/torch/install/share/lua/5.1/trepl/init.lua:389: /root/torch/install/share/lua/5.1/hdf5/ffi.lua:42: Error: unable to locate HDF5 header file at hdf5.h

Root cause is "share/lua/5.1/hdf5/ffi.lua:71: Unsupported HDF5 version: 1.10.0" .....

@philipgher
Copy link

Having the same problem on OS X, no idea how to fix it yet

@allenv0
Copy link

allenv0 commented Oct 22, 2017

Having the same problem on OSX too...

@sharpie7
Copy link

sharpie7 commented Dec 3, 2017

I have created a fork (https://github.com/sharpie7/torch-rnn), and a pull request #215 which should help with this on Ubuntu 17.04. It may also work for OSX.

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

No branches or pull requests

4 participants