I first complained about my dishes, tried various methods to install, and finally succeeded in the seventh attempt. Anaconda is used here to build a virtual environment. To be honest, this is really easy to use. Conda is really nice compared to pip, which has problems at all times.
1. Download anaconda from the official website, this download will be very slow, you can hang a ladder.
2. Open the Anaconda prompt and use anaconda to downgrade python from 3.8 to 3.6 (you need to enter y in the middle):
conda install python=3.6
3. First add a Tsinghua mirror image through the following code to speed up the download.
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
4. Create an environment that depends on python3.6
conda create -n tensorflow python=3.6
5. Activate the tensorflow environment
activate tensorflow
6. Install tensorflow, version 1.12.0 is selected here
conda install tensorflow=1.12.0
7. Install keras
conda install keras
8. Test, enter python in cmd, enter python, and then enter impor keras to see if there is an error