ImportError: DLL load failed while importing defs

Viewed 1615

I'm trying to install sentence-transformers library. But when I import it, this error pops out:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-c9f0b8c65221> in <module>
----> 1 import h5py

~\Anaconda3\envs\custom_env\lib\site-packages\h5py\__init__.py in <module>
     32         raise
     33 
---> 34 from . import version
     35 
     36 if version.hdf5_version_tuple != version.hdf5_built_version_tuple:

~\Anaconda3\envs\custom_env\lib\site-packages\h5py\version.py in <module>
     15 
     16 from collections import namedtuple
---> 17 from . import h5 as _h5
     18 import sys
     19 import numpy

h5py\h5.pyx in init h5py.h5()

ImportError: DLL load failed while importing defs: The specified procedure could not be found.

I have installed h5py library. What am I missing?

1 Answers

I had the same problem after a CUDA/CUdnn update that probably messed some DLLs. I did: pip uninstall h5py, which indicated a successful uninstall along with some error messages. And immediately after pip install h5py

Sometimes simple solutions work.

Related