gpt4 book ai didi

python-3.x - 尝试为 python3 安装 pytables

转载 作者:行者123 更新时间:2023-12-05 04:53:16 24 4
gpt4 key购买 nike

我使用 pip python -m pip install tables

但是我得到了这个错误

Collecting tables
Using cached tables-3.6.1.tar.gz (4.6 MB)
ERROR: Command errored out with exit status 1:
command: /Users/collin.dubois/.pyenv/versions/3.9.1/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/77/mcsqy01d02s75d2q7j91_bjh0000gp/T/pip-install-u9olbi_v/tables_99aa9c30dedd4ec596aea4e44ada3c1c/setup.py'"'"'; __file__='"'"'/private/var/folders/77/mcsqy01d02s75d2q7j91_bjh0000gp/T/pip-install-u9olbi_v/tables_99aa9c30dedd4ec596aea4e44ada3c1c/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/77/mcsqy01d02s75d2q7j91_bjh0000gp/T/pip-pip-egg-info-p0ecdq96
cwd: /private/var/folders/77/mcsqy01d02s75d2q7j91_bjh0000gp/T/pip-install-u9olbi_v/tables_99aa9c30dedd4ec596aea4e44ada3c1c/
Complete output (10 lines):
/var/folders/77/mcsqy01d02s75d2q7j91_bjh0000gp/T/H5close1rzctrpl.c:2:5: error: implicit declaration of function 'H5close' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
H5close();
^
1 error generated.
* Using Python 3.9.1 (default, Feb 9 2021, 16:57:09)
* USE_PKGCONFIG: True
.. 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.
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/2b/32/847ee3f521aae6a0be380d923a736162d698586f444df1ac24b98c65025c/tables-3.6.1.tar.gz#sha256=49a972b8a7c27a8a173aeb05f67acb45fe608b64cd8e9fa667c0962a60b71b49 (from https://pypi.org/simple/tables/) (requires-python:>=3.5). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached tables-3.5.2.tar.gz (7.8 MB)
ERROR: Command errored out with exit status 1:
command: /Users/collin.dubois/.pyenv/versions/3.9.1/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/77/mcsqy01d02s75d2q7j91_bjh0000gp/T/pip-install-u9olbi_v/tables_8dfaf86b7caf47dcbafcd5579306579a/setup.py'"'"'; __file__='"'"'/private/var/folders/77/mcsqy01d02s75d2q7j91_bjh0000gp/T/pip-install-u9olbi_v/tables_8dfaf86b7caf47dcbafcd5579306579a/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/77/mcsqy01d02s75d2q7j91_bjh0000gp/T/pip-pip-egg-info-60mnmhkv
cwd: /private/var/folders/77/mcsqy01d02s75d2q7j91_bjh0000gp/T/pip-install-u9olbi_v/tables_8dfaf86b7caf47dcbafcd5579306579a/
Complete output (10 lines):
/var/folders/77/mcsqy01d02s75d2q7j91_bjh0000gp/T/H5closeq10kpd29.c:2:5: error: implicit declaration of function 'H5close' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
H5close();
^
1 error generated.
* Using Python 3.9.1 (default, Feb 9 2021, 16:57:09)
* USE_PKGCONFIG: True
.. 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.
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/73/51/6dabb2b94826e5db3aa2542b80f1382780b96a0cd13e0cfb637b36ede5c5/tables-3.5.2.tar.gz#sha256=b220e32262bab320aa41d33125a7851ff898be97c0de30b456247508e2cc33c2 (from https://pypi.org/simple/tables/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached tables-3.5.1.tar.gz (8.3 MB)
ERROR: Command errored out with exit status 1:
command: /Users/collin.dubois/.pyenv/versions/3.9.1/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/77/mcsqy01d02s75d2q7j91_bjh0000gp/T/pip-install-u9olbi_v/tables_5bc73699d09a40c2b40def4a0095b1b4/setup.py'"'"'; __file__='"'"'/private/var/folders/77/mcsqy01d02s75d2q7j91_bjh0000gp/T/pip-install-u9olbi_v/tables_5bc73699d09a40c2b40def4a0095b1b4/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/77/mcsqy01d02s75d2q7j91_bjh0000gp/T/pip-pip-egg-info-4fky2xo8
cwd: /private/var/folders/77/mcsqy01d02s75d2q7j91_bjh0000gp/T/pip-install-u9olbi_v/tables_5bc73699d09a40c2b40def4a0095b1b4/
Complete output (10 lines):
/var/folders/77/mcsqy01d02s75d2q7j91_bjh0000gp/T/H5closed5d6i0hx.c:2:5: error: implicit declaration of function 'H5close' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
H5close();
^
1 error generated.
* Using Python 3.9.1 (default, Feb 9 2021, 16:57:09)
* USE_PKGCONFIG: True
.. 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.
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/c6/e6/38cdcdc501ff889ea1e60bd5ef61d0573f73606f4dd0169786fd991c6b70/tables-3.5.1.tar.gz#sha256=88e2f3be1f143febc8bf8a7fe49ad51fc12518d6a1ac4eb641778d93e5dc2039 (from https://pypi.org/simple/tables/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached tables-3.4.4.tar.gz (4.6 MB)
ERROR: Command errored out with exit status 1:
command: /Users/collin.dubois/.pyenv/versions/3.9.1/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/77/mcsqy01d02s75d2q7j91_bjh0000gp/T/pip-install-u9olbi_v/tables_db342c32f4a04906b9550c36cd3ecad2/setup.py'"'"'; __file__='"'"'/private/var/folders/77/mcsqy01d02s75d2q7j91_bjh0000gp/T/pip-install-u9olbi_v/tables_db342c32f4a04906b9550c36cd3ecad2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/77/mcsqy01d02s75d2q7j91_bjh0000gp/T/pip-pip-egg-info-3uuf2txv
cwd: /private/var/folders/77/mcsqy01d02s75d2q7j91_bjh0000gp/T/pip-install-u9olbi_v/tables_db342c32f4a04906b9550c36cd3ecad2/
Complete output (10 lines):
/var/folders/77/mcsqy01d02s75d2q7j91_bjh0000gp/T/H5close4uirht4u.c:2:5: error: implicit declaration of function 'H5close' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
H5close();
^
1 error generated.
* Using Python 3.9.1 (default, Feb 9 2021, 16:57:09)
* USE_PKGCONFIG: True

最佳答案

这是缺少 HDF5 依赖项或未以 PyTables 的 setup.py 脚本可以找到的标准方式安装的情况。参见 this thread有关 MacOS 上此问题的一些详细信息以及与 Ubuntu 相关的一些评论。

如果您使用的是 MacOS,您可以先简单地尝试 brew install HDF5 看看是否有帮助。在 *nix 发行版上,确保安装了适用于您的平台的 dev 包以及库,例如libhdf5-devlibhdf5

如果您有 HDF5 的自定义构建,请查看上面的链接以获取一些有用的环境变量,这些变量可以帮助通知 pytables 在何处查找 HDF5 header 和库。

编辑:解决了在 mac arm 上使用 homebrew hdf5 并在安装表之前设置 HDF5_DIR 环境变量

brew install hdf5
HDF5_DIR=<homebrew_location>/opt/hdf5 pip install tables

关于python-3.x - 尝试为 python3 安装 pytables,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66147426/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com