Locking of HDF files using h5py
Similar as with the other answers I had already opened the file, but for me it was in a separate HDF5 viewer.
I have a whole bunch of code interacting with hdf files through h5py.  The code has been working for years. Recently, with a change in python environments, I am receiving this new error message.  
IOError: Unable to open file (unable to lock file, errno = 11, error message = 'Resource temporarily unavailable')
What is interesting is the error occurs intermittently in some places and persistently in others. In places where it is occuring routinely, I have looked at my code and confirm that there is no other h5py instance connected to the file and that the last connection was properly flushed and closed.  Again this was all working fine prior to the environment change.  
Heres snippets from my conda environment:
h5py                      2.8.0            py27h470a237_0    conda-forge
hdf4                      4.2.13                        0    conda-forge
hdf5                      1.10.1                        2    conda-forge