Normal online installation method:
pip install h5py
I kept getting an error when installing,
Solution : Install the wheel library first, then manually download the compatible h5py version, and then install it. The detailed steps are as follows:
1. Install the wheel library :
pip install wheel
2. Check your suitable h5py version :
python -m pip debug --verbose
3. Download h5py
website: https://www.lfd.uci.edu/~gohlke/pythonlibs/#h5py
I use python3.8, according to the requirements, select the following cp38, according to the display in step 2, select Downloaded h5py‑3.4.0‑cp38‑cp38‑win_amd64.whl (Supplement: This should be selected according to the results of step 2. If there is win32, choose the one with win32, which must correspond to the computer.) Remember the download path, try
to Do not have Chinese.
4. Installation
Enter the path of the file just downloaded. For example, I downloaded the python folder on the f disk,
and then enter the command:
the format is: pip install .\The file name just downloaded
For example, enter:
pip install .\h5py-3.4.0-cp38-cp38-win_amd64.whl
(This is a picture taken after I entered the command after the installation was successful, it may be different from your display)
5. Test
Enter python interactive mode, enter
import h5py
Press Enter without reporting an error, and it can already be used.