Introduction
Get started with Django on Google Axion C4A (Arm Neoverse-V2)
Configure firewall rules for Django on Google Cloud
Create a Google Axion C4A Arm virtual machine on GCP
Install Django on your Arm-based VM
Verify Django installation and run the development server
Benchmark Django application performance on Arm
Next Steps
After connecting to your SUSE Linux Enterprise Server (SLES) VM using SSH, you’ll update your system, install Python 3.11, and set up a virtual environment for your Django project.
Begin by refreshing your package list and upgrading installed software to ensure you have the latest versions and security patches:
sudo zypper refresh
sudo zypper update -y
Django requires Python 3.10 or later. You’ll install Python 3.11 along with pip (Python’s package manager) and essential build tools needed for compiling Python packages:
sudo zypper install -y python311 python311-pip python311-devel git gcc make
Verify that Python and pip are installed correctly:
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 dedicated directory for your Django project and set up a Python virtual environment to isolate your project’s dependencies:
mkdir ~/myproject && cd ~/myproject
python3.11 -m venv venv
source venv/bin/activate
The python3.11 -m venv venv command creates an isolated Python environment named venv inside your project folder. Running source venv/bin/activate activates this environment.
Once activated, your command prompt displays (venv) at the beginning, indicating you’re working inside an isolated Python environment where all packages are isolated from your system Python installation.
With your virtual environment active, upgrade pip to the latest version:
python3 -m pip install --upgrade pip
Now install Django and additional useful packages for web development:
python3 -m pip install django gunicorn
This installs:
Verify that Django is installed correctly:
django-admin --version
The output is similar to:
5.2.8
You have successfully installed Django and all required dependencies on your Arm-based VM. Your environment is now ready for creating Django projects and applications!