安装lib表时出错,在Windows中找不到hdf5

时间:2018-08-14 13:43:38

标签: python windows python-3.x pip hdf5

我无法在Windows环境中执行表lib的isntall,无法找到解决方案,该错误是关于hdf5安装和hdf5目录的!

有人知道我该如何解决?

错误是:

    C:\Users\thiago.bueno>pip install --upgrade tables
Collecting tables
  Using cached https://files.pythonhosted.org/packages/4d/53/8f34ce887c2a2ad8051
8980419a5f6f41defc85a287a355987e559ce9385/tables-3.4.4.tar.gz
    Complete output from command python setup.py egg_info:
    H5closextvivw_e.c
    C:\Users\THIAGO~1.BUE\AppData\Local\Temp\H5closextvivw_e.c(2): warning C4013
: 'H5close' indefinido; assumindo extern retornando int
    LINK : fatal error LNK1181: não foi possível abrir o arquivo de entrada 'hdf
5.lib'
    * Using Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914
64 bit (AMD64)]
    * USE_PKGCONFIG: False
    .. ERROR:: Could not find a local HDF5 installation.
       You may need to explicitly state where your local HDF5 headers and
       library can be found by setting the ``HDF5_DIR`` environment
       variable or by using the ``--hdf5`` command-line option.

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\THIAGO~1
.BUE\AppData\Local\Temp\pip-install-k7z1g3z5\tables\

2 个答案:

答案 0 :(得分:0)

要从源代码安装PyTables,您需要大量prerequisites

在PyPI there are上,w32和w64二进制轮子分别适用于Python 2.7、3.5和3.6。如果可以更改Python版本,则可以安装预编译的PyTables。

答案 1 :(得分:0)

如果可以选择使用 conda,conda install pytables 很可能会在 Windows 环境中解决该问题(在 Windows 10、python 3.9、表 3.6.1 上测试)。