Cysu / open-reid

Open source person re-identification library in python
https://cysu.github.io/open-reid/
MIT License
1.34k stars 349 forks source link

MacOS Sierra 10.12 hdf5.h not found #47

Closed riccitensor closed 6 years ago

riccitensor commented 6 years ago

I am installing open-reid on MacOS by running setup.py install.

I have the following:

System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: 
      "Using deprecated NumPy API, disable it by "          "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
      [-W#warnings]
#warning "Using deprecated NumPy API, disable it by " \
 ^
In file included from /tmp/easy_install-TjMlGE/h5py-2.7.1/h5py/defs.c:569:
./h5py/api_compat.h:27:10: fatal error: 'hdf5.h' file not found
#include "hdf5.h"
         ^~~~~~~~
1 warning and 1 error generated.
error: Setup script exited with error: command 'cc' failed with exit status 1
Cysu commented 6 years ago

Please install homebrew first and then brew install hdf5 should work.

By the way, it seems that it's using system's python2.7. It's better to specify python version during installation, e.g. python3 and pip3 instead of python and pip.