Installing Dependencies
Procedure
- Use PuTTY to log in to the server as the root user.
- Install Python.
yum install python3-devel python3-pip
- Check whether Python is successfully installed.
python3 --version
If the correct version is displayed, the installation is successful.
- Create a Keras virtual environment.
pip3 install virtualenv mkdir -p /path/to/keras python3 -m venv /path/to/keras source /path/to/keras/bin/activate
- Go to the Keras environment.
cd /path/to/keras
- Download the TensorFlow package.
wget https://github.com/lhelontra/tensorflow-on-arm/releases/download/v2.4.0/tensorflow-2.4.0-cp37-none-linux_aarch64.whl
- Install TensorFlow.
pip3 install tensorflow-2.4.0-cp37-none-linux_aarch64.whl --trusted-host mirrors.tools.huawei.com -i http://mirrors.tools.huawei.com/pypi/simple
TensorFlow may fail to be installed due to h5py.
- Download the h5py package and decompress it.
wget http://mirrors.tools.huawei.com/pypi/packages/5f/97/a58afbcf40e8abecededd9512978b4e4915374e5b80049af082f49cebe9a/h5py-2.10.0.tar.gz tar xvf h5py-2.10.0.tar.gz
- Install h5py.
cd h5py-2.10.0 python3 setup.py install
Information similar to the following is displayed:

- Install TensorFlow again.
cd .. pip3 install tensorflow-2.4.0-cp37-none-linux_aarch64.whl --trusted-host mirrors.tools.huawei.com -i http://mirrors.tools.huawei.com/pypi/simple
Information similar to the following is displayed:

Parent topic: Configuring the Compilation Environment