简体   繁体   中英

h5py install error failed with exit status 2

I am using Windows 7 and Python 2.7.9. I tried to install h5py with pip, but have the following error:

[c:\\users\\dell\\appdata\\local\\temp\\pip-build-j2msd9\\h5py\\h5py\\api_compat.h(27) : fatal error C1083: cannot open include file:“hdf5.h”: No such file or directory

error: command 'd:\\visual studio 2008\\VC\\BIN\\amd64\\cl.exe' failed with exit status 2

http://i.stack.imgur.com/N3VO8.jpg


things I have tried:

  1. Reinstall Visual Studio 2008 compiler
  2. installed some necessary modules such as modHDF5 and numpy

The error you are getting is because you have not installed HDF5, or you have not specified the directory that HDF5 has been installed into.

The simplest thing to do, is to try to install h5py with a modern pip which supports wheels (eg run python.exe -m pip install -U pip , and then try reinstalling h5py).

If you want to build from source on Windows, see http://docs.h5py.org/en/latest/build.html#source-installation-on-windows , but I strongly recommend using wheels on Windows (as the person who wrote said CI scripts).

我将 h5py 的版本更改为 2.9.0 并且它的工作非常吸引人请检查与预构建包一起安装的版本。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM