2

I build and compiled python 3.5 and then installed virtualenv. I installed pandas this way: sudo venv/bin/pip3.5 install pandas I ran my application this way:

python3.5 my_test_app.py

Clearly, I'm using python3.5 but I'm still having issues 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
DevEx
  • 4,337
  • 13
  • 46
  • 68
  • PyTables is listed as an optional dependency of Pandas (so likely won't be installed by pip install): http://pandas.pydata.org/pandas-docs/stable/install.html#optional-dependencies. Have you installed [PyTables](http://www.pytables.org/)? – DavidW Mar 07 '17 at 21:24

1 Answers1

6

Try sudo venv/bin/pip3.5 install tables

DougKruger
  • 4,424
  • 14
  • 41
  • 62