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

import h5py

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

 

ImportError                               Traceback (most recent call last)
Cell In[2], line 1
----> 1 import h5py

File E:\Eprogramfiles\Anaconda3\envs\myenvpy38\lib\site-packages\h5py\__init__.py:26
     20 # --- Library setup -----------------------------------------------------------
     21
     22 # When importing from the root of the unpacked tarball or git checkout,
     23 # Python sees the "h5py" source directory and tries to load it, which fails.
     24 # We tried working around this by using "package_dir" but that breaks Cython.
     25 try:
---> 26     from . import _errors
     27 except ImportError:
     28     import os.path as _op

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

 

原因:

可能和不正确安装 h5py 这个包有关系

 

解决:

pip uninstall h5py

换成使用conda安装

conda install h5py

 

posted @ 2024-10-29 14:49  emanlee  阅读(12)  评论(0编辑  收藏  举报