Error in import h5py when running on local machine

Whenever I try to run a the ipynb file from assignment, which use h5py file.
I get this error in import h5py.
Please help me out with this, as I am unable to run any of the files which use h5py. I have tried installing different versions of h5py and reinstalling it. Using different environments. Please help me with this.
-------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[1], line 2 1 import numpy as np ----> 2 import h5py 3 import matplotlib.pyplot as plt 4 from public_tests import * File ~\miniconda3\envs\env2\Lib\site-packages\h5py_init_.py:25 19 # — Library setup ----------------------------------------------------------- 20 21 # When importing from the root of the unpacked tarball or git checkout, 22 # Python sees the “h5py” source directory and tries to load it, which fails. 23 # We tried working around this by using “package_dir” but that breaks Cython. 24 try: —> 25 from . import _errors 26 except ImportError: 27 import os.path as _op ImportError: DLL load failed while importing _errors: The specified procedure could not be found.

Are you using the same version of packages as used in the coursera jupyter environment?

There are no official instructions for how to run the notebooks in some other environment. The problem is that there are just too many possibilities.

Here’s a thread from a fellow student that gives some useful guidance about how to get started on this project including things like how to reproduce the version environment as Balaji mentioned above.