首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >无法在HDF5 Mac上找到PyTables的M1安装

无法在HDF5 Mac上找到PyTables的M1安装
EN

Stack Overflow用户
提问于 2022-07-19 00:26:23
回答 3查看 1.2K关注 0票数 3

运行在M1 Mac,macOS Monterey 12.4Python 3.10.3

pip install tables

代码语言:javascript
运行
复制
Collecting tables
  Using cached tables-3.7.0.tar.gz (8.2 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [12 lines of output]
      /var/folders/6g/9c7g_2tx2sb7lp8ttwtfky640000gn/T/H5closew_79lujq.c:2:5: error: implicit declaration of function 'H5close' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
          H5close();
          ^
      1 error generated.
      cpuinfo failed, assuming no CPU features: No module named 'cpuinfo'
      * Using Python 3.10.3 (v3.10.3:a342a49189, Mar 16 2022, 09:34:18) [Clang 13.0.0 (clang-1300.0.29.30)]
      * Found cython 0.29.30
      * 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.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

我从这个试过以下几点的GitHub问题:

代码语言:javascript
运行
复制
pip install cython
brew install hdf5
brew install c-blosc
export HDF5_DIR=/usr/local/
export BLOSC_DIR=/usr/local/
pip install tables

但还是会犯同样的错误。不确定这是否是由于在M1 Mac上使用不同路径的家庭酿造的缘故?

EN

回答 3

Stack Overflow用户

发布于 2022-07-19 01:59:52

问题是,Homebrew将文件放在opt/homebrew/opt/

这个帮我修好了:

代码语言:javascript
运行
复制
export HDF5_DIR=/opt/homebrew/opt/hdf5 
export BLOSC_DIR=/opt/homebrew/opt/c-blosc
票数 6
EN

Stack Overflow用户

发布于 2022-11-01 13:46:36

再次在完成中消除混乱。在Mac M1上的终端上运行以下内容应该可以。

代码语言:javascript
运行
复制
pip install cython
brew install hdf5
brew install c-blosc
export HDF5_DIR=/opt/homebrew/opt/hdf5 
export BLOSC_DIR=/opt/homebrew/opt/c-blosc
pip install tables
票数 2
EN

Stack Overflow用户

发布于 2022-09-12 13:58:29

从这里开始,我解决了这个问题:

https://github.com/freqtrade/freqtrade/issues/4162

向下滚动并查看camxus提供的“解决方案”

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73029883

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档