簡體   English   中英

嘗試為 python3 安裝 pytables

[英]Trying to install pytables for python3

我使用 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腳本可以找到的標准方式安裝的情況。 有關 MacOS 上此問題的一些詳細信息以及與 Ubuntu 相關的一些評論,請參閱此線程

如果您使用的是 MacOS,您可以先嘗試brew install HDF5看看是否有幫助。 在 *nix 發行版上,確保您安裝了適合您的平台的dev package 以及庫,例如libhdf5-devlibhdf5

如果您有 HDF5 的自定義構建,請查看上面的鏈接以獲取一些有用的環境變量,這些環境變量可以幫助告知 pytables 在哪里查找 HDF5 頭文件和庫。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM