File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 55
66
77import logging
8+ from distutils .version import LooseVersion
89import pickle
910import numpy as np
1011import quantities as pq
2324from neo .core .baseneo import MergeError
2425
2526logger = logging .getLogger ('Neo' )
26-
27+ min_h5py_version = LooseVersion ( '2.6.0' )
2728
2829def disjoint_groups (groups ):
2930 """`groups` should be a list of sets"""
@@ -55,6 +56,10 @@ class NeoHdf5IO(BaseIO):
5556 def __init__ (self , filename ):
5657 if not HAVE_H5PY :
5758 raise ImportError ("h5py is not available" )
59+ if HAVE_H5PY :
60+ if LooseVersion (h5py .__version__ ) < min_h5py_version :
61+ raise ImportError ('h5py version {} is too old. Minimal required version is {}'
62+ '' .format (h5py .__version__ , min_h5py_version ))
5863 BaseIO .__init__ (self , filename = filename )
5964 self ._data = h5py .File (filename , 'r' )
6065 self .object_refs = {}
You can’t perform that action at this time.
0 commit comments