【发布时间】:2018-12-06 02:10:58
【问题描述】:
我尝试通过以下方式安装 python 库表:pip install tables
这会导致错误
Collecting tables Using cached https://files.pythonhosted.org/packages/4d/53/8f34ce887c2a2ad80518980419a5f6f41defc85a287a355987e559ce9385/tables-3.4.4.tar.gz
Complete output from command python setup.py egg_info:
H5closeplbq5iz8.c
C:\Users\tkim1\AppData\Local\Temp\H5closeplbq5iz8.c(2): warning C4013: 'H5close' undefined; assuming extern returning int
LINK : fatal error LNK1181: cannot open input file 'hdf5.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.
找不到 HDF5 的这个问题似乎很常见:https://github.com/PyTables/PyTables/issues/219、https://github.com/PyTables/PyTables/issues/385。但是作为编码的新手,我很难跟上讨论。 我在尝试解决此问题时遇到的最令人困惑的事情之一是正在讨论的许多终端代码并未被我的终端采用。
sudo python setup.py build_ext --inplace --hdf5=/opt/local --lzo=/opt/local --bzip2==opt/local
output: 'sudo' is not recognized as an internal or external command,operable program or batch file.
env HDF5_DIR=$PWD pip install tables
output:'env' is not recognized as an internal or external command,operable program or batch file.
任何有关解决此安装问题或有关我如何应用这些不同终端命令的帮助将不胜感激。谢谢大家。
【问题讨论】:
-
你在哪个操作系统上?
-
嗨哈拉莫兹。我正在我的 Windows 10 上安装它
-
如果你使用 Python 3.6 而不是 3.7,你就不会遇到这些问题,因为 Pytables 是为 Pythonhere 下载预编译的轮子(确保您正在下载与您的 Python 版本匹配的轮子)并从本地轮子文件安装 Pytables:
pip install C:\path\to\wheel。 -
嘿@hoefling。那行得通!非常感谢
-
@hoefling,你把我的压力减轻了 99.999%。太感谢了。如果我是你,我会用你的评论来回答这个问题,因为它似乎确实有效!
标签: python windows pip windows-10 hdf5