HDFStore Requires PyTables error when Labeling Extracted Frames

Hello everyone!

Happy New Year! I’m running through the Demo_yourowndata.ipynb example (found on https://github.com/AlexEMG/DeepLabCut/blob/master/examples/Demo_yourowndata.ipynb) and am stuck on the “Label the extracted frames” portion of the workflow. I am able to open up the labeling .gui and label 20 frames but at the end of it, pressing ‘Save’ on the .gui generates the following error:

" ImportError: HDFStore requires PyTables, “DLL load failed: The specified procedure could not be found.” problem importing"

I have checked the pip list and confirmed that the Tables module is of the correct version. I also checked the ‘labeled-data’ folder and found a .csv file of the collected data (coordinates have been logged per frame), but no .h5 file.

How should I proceed?

Hi there, it seems there is a recent error with pytables and python 3.7 (so far as I can tell!)

couple fixes: (1) we recently updated the code (2.0.3) to fix the pytables version to 3.4.3, so you can pip install --upgrade deeplabcut

(2) if you are using an Anaconda env, be sure you use python 3.6. If you are using Windows, you can use this yaml file to create a new environment (just put in a folder) https://github.com/AlexEMG/DeepLabCut/tree/master/conda-environments - depending on CPU or GPU, open the yaml file (any word processor) and run the supplied command.

or, (3) in your current environment, make sure you are using Python3.6, and once inside the environment:

conda install -c conda-forge pytables
pip install --upgrade deeplabcut

(this issue reports a similar problem, https://github.com/AlexEMG/DeepLabCut/issues/164 but they got the demo to work, so i’m not clear on the error…)

1 Like

Thank you for your assistance! For some context, we’re using Anaconda on Windows 10. We did set up the environment using the exact file referenced in the protocol with DLC 2.0.3 and Python 3.6, yet it didn’t work. It looks like currently, by following your procedures, the module “pytables” will not be created. It perhaps needs to be supplemented with conda install -c conda -forge pytables (as you suggested) to get the .h5 saving to work. This cleared up the issue on our end! Thank you again for your help.

1 Like

great, thanks for the update - we should add that line to the yaml file then, just in case! Happy DeepLabCutting!

Hi! I have the same problem, running deeplabcut under windows 10. Specifically I am trying to follow the Demo_yourowndata.ipynb notebook and the error occurs after clicking “Save” in the label GUI (deeplabcut.label_frames(path_config_file)).
I tried the suggested steps:
conda install -c conda-forge pytables
pip install --upgrade deeplabcut
(also turned around the order of those steps)
but it did not help.

Any suggestions?

deeplabcut 2.0.4
h5py 2.7.0
pandas 0.21.0

Alright, sorry for the spam. I just discovered the conda environment files. Re-installation with those did the trick. Thanks!


Hi Horsto,

Could you give more details about it?

Because I also have tried every described procedure here and still can’t make the pytables work.

Hi Okoba,
I’d suggest you just wipe the environment (assuming you have it all in a conda environment) and start from scratch. It probably makes sense to not conda install too many additional libraries on top of the ones in the official conda env files (check https://github.com/AlexEMG/DeepLabCut/tree/master/conda-environments). I hope I make sense. Anyway, freshly installing the environment did the trick for me.

I had exactly the same problem as theballthrower and your solution solved it. Thanks.