Rate This Document
Findability
Accuracy
Completeness
Readability

Installing Dependencies

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Install Python.
    yum install python3-devel python3-pip
  3. Check whether Python is successfully installed.
    python3 --version

    If the correct version is displayed, the installation is successful.

  4. 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
  5. Go to the Keras environment.
    cd /path/to/keras
  6. 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
  7. 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.

  8. 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
  9. Install h5py.
    cd h5py-2.10.0
    python3 setup.py install

    Information similar to the following is displayed:

  10. 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: