ImportError HDFStore requires PyTables No module named tables

前端 未结 7 1872
暗喜
暗喜 2020-12-14 14:27
import pandas as pd
dfs = pd.HDFStore(\'xxxxx.h5\')

throws this error:

\"ImportError: HDFStore requires PyTables, \"No module named t

相关标签:
7条回答
  • 2020-12-14 14:31

    Simply updating pytables with:

    pip install --upgrade tables
    

    worked for me.

    0 讨论(0)
  • 2020-12-14 14:34

    You have to install pytables:

    conda install pytables

    0 讨论(0)
  • 2020-12-14 14:37

    On Ubuntu, I solved this problem using this command:

    sudo apt-get install python3-tables
    

    Note that I am using Python 3

    0 讨论(0)
  • 2020-12-14 14:48

    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.

    Then I downloaded and installed MiniConda. And then I used the below command to install pytables.

    conda install -c conda-forge pytables
    

    Please refer the below screenshot.

    0 讨论(0)
  • 2020-12-14 14:48

    You can use pip on any os :

    python -m pip install tables

    You can check the official documentation on more ways to install it http://www.pytables.org/usersguide/installation.html

    0 讨论(0)
  • 2020-12-14 14:50

    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:

    sudo pip install git+https://github.com/PyTables/PyTables
    

    If it solved the problem, the question should be closed :)

    0 讨论(0)
提交回复
热议问题