python3.5 ImportError HDFStore需要PyTables没有名为tables的模块

时间:2017-03-07 21:17:46

标签: python

我构建并编译了python 3.5,然后安装了virtualenv。 我用这种方式安装了熊猫: sudo venv/bin/pip3.5 install pandas 我以这种方式运行我的应用程序:

python3.5 my_test_app.py

显然,我使用的是python3.5,但我仍然遇到HDFStore问题:

Traceback (most recent call last):
  File "my_test_app.py", line 105, in <module>
    myfunction()
  File "my_test_app.py", line 101, in myfunction
    df.to_hdf("./data/mydf", 'data', format='table', data_columns=True)
  File "/home/ubuntu/venv/lib/python3.5/site-packages/pandas/core/generic.py", line 1138, in to_hdf
    return pytables.to_hdf(path_or_buf, key, self, **kwargs)
  File "/home/ubuntu/venv/lib/python3.5/site-packages/pandas/io/pytables.py", line 269, in to_hdf
    complib=complib) as store:
  File "/home/ubuntu/venv/lib/python3.5/site-packages/pandas/io/pytables.py", line 433, in __init__
    'importing'.format(ex=str(ex)))
ImportError: HDFStore requires PyTables, "No module named 'tables'" problem importing

1 个答案:

答案 0 :(得分:6)

尝试sudo venv/bin/pip3.5 install tables