Install TensorFlow on Google Axion C4A

TensorFlow is an open-source machine learning (ML) library developed by Google for building and deploying ML models efficiently. On 64-bit Arm architecture (aarch64) SUSE Linux Enterprise Server (SLES) VMs, TensorFlow runs natively on the CPU and can use the GPU if available.

Update your system

Update your system and install Python 3.11, pip, and virtual environment support:

    

        
        
sudo zypper refresh
sudo zypper install python311 python311-pip python311-venv

    

Enter “y” when prompted to confirm the installation. This ensures your system has the essential tools required for TensorFlow setup.

Verify Python installation

Confirm that Python and pip are correctly installed:

    

        
        
python3.11 --version
pip3.11 --version

    

The output is similar to:

    

        
        Python 3.11.10
pip 22.3.1 from /usr/lib/python3.11/site-packages/pip (python 3.11)

        
    

Create a virtual environment

Set up an isolated Python environment to keep TensorFlow dependencies separate from system packages:

    

        
        
python3.11 -m venv tf-venv
source tf-venv/bin/activate

    

Your virtual environment tf-venv is now active and isolated from system packages.

Upgrade pip

Upgrade pip to the latest version for reliable package installation:

    

        
        
pip3 install --upgrade pip

    

Install TensorFlow

Install the latest stable TensorFlow version for Arm64:

    

        
        
pip3 install tensorflow==2.20.0

    
Note

TensorFlow 2.18.0 introduced compatibility with NumPy 2.0, incorporating its updated type promotion rules and improved numerical precision. You can review What’s new in TensorFlow 2.18 for more information.

The Arm Ecosystem Dashboard recommends TensorFlow version 2.18.0 as the minimum recommended version on Arm platforms.

Verify the installation

Check that TensorFlow installed successfully and display the version:

    

        
        
python -c "import tensorflow as tf; print(tf.__version__)"

    

The output is similar to:

    

        
        2.20.0

        
    

You have now installed TensorFlow on your Arm-based VM and are ready to start building and running machine learning models!

Back
Next