Python ImportError HDFStore 需要 PyTables No module named tables
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25980018/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
ImportError HDFStore requires PyTables No module named tables
提问by nikhil sahai
import pandas as pd
dfs = pd.HDFStore('xxxxx.h5')
throws this error:
抛出这个错误:
"ImportError: HDFStore requires PyTables, "No module named tables" problem importing"
"ImportError: HDFStore requires PyTables, "No module named tables" problem importing"
I tried to install PyTables, which Requires Cython. I have Cython 0.21 installed, but it is throwing an error stating that Cython should be greater than 0.13
我尝试安装需要 Cython 的 PyTables。我安装了 Cython 0.21,但它抛出一个错误,指出 Cython 应该大于 0.13
Here is the log that I am getting:
这是我得到的日志:
".. ERROR:: You need Cython 0.13 or greater to compile PyTables!
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /private/tmp/pip_build_root/tables
Storing debug log for failure in /Users/nikhilsahai/Library/Logs/pip.log
Nikhils-MacBook-Pro:~ nikhilsahai$ sudo pip install cython
Requirement already satisfied (use --upgrade to upgrade): cython in /Library/Python/2.7/site-packages/Cython-0.21-py2.7-macosx-10.9-intel.egg
Cleaning up..."
Please guide me how to do solve this issue.
请指导我如何解决这个问题。
回答by Tarik
On Ubuntu, I solved this problem using this command:
在 Ubuntu 上,我使用以下命令解决了这个问题:
sudo apt-get install python3-tables
Note that I am using Python 3
请注意,我使用的是 Python 3
回答by joanfihu
As TomAugspurger mentioned... It seems there is a bug with the latest version of pytables. You can install the current development version by executing the following command:
正如 TomAugspurger 所提到的......最新版本的 pytables 似乎存在错误。您可以通过执行以下命令来安装当前的开发版本:
sudo pip install git+https://github.com/PyTables/PyTables
If it solved the problem, the question should be closed :)
如果它解决了问题,问题应该被关闭:)
回答by Yulong Deng
On Windows,maybe that is a good choices,using this Command:
在 Windows 上,也许这是一个不错的选择,使用以下命令:
pip installed tables-3.2.2-cp34-cp34m-win_amd64.whl
pip 安装表-3.2.2-cp34-cp34m-win_amd64.whl
---the document you can download from http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
---您可以从http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy下载的文档
回答by hoaphumanoid
You have to install pytables:
你必须安装pytables:
conda install pytables
conda install pytables
回答by Tharindu Kumara
I also had the same error when using HDFStore. And I tried all the steps specified above and spent many hours to find a solution, but non of them were successful.
使用HDFStore时我也遇到了同样的错误。我尝试了上面指定的所有步骤并花了很多时间来寻找解决方案,但没有一个成功。
Then I downloaded and installed MiniConda. And then I used the below command to install pytables.
然后我下载并安装了MiniConda。然后我使用下面的命令来安装 pytables。
conda install -c conda-forge pytables
Please refer the below screenshot.
请参考下面的截图。
回答by SEDaradji
You can use pip on any os :
您可以在任何操作系统上使用 pip :
python -m pip install tables
python -m pip 安装表
You can check the official documentation on more ways to install it http://www.pytables.org/usersguide/installation.html
更多安装方法可以查看官方文档 http://www.pytables.org/usersguide/installation.html
回答by lin_bug
Simply updating pytableswith:
只需更新pytables:
pip install --upgrade tables
worked for me.
为我工作。


