Here is how to install Django framework on Ubuntu 20.04 in under two minutes:
Step 0 - Install python
Before we start it is important to check if python in already installed on your system. To do that, run the following command:
If python is not installed on your system, install it using the following command:
sudo apt-get update && sudo apt-get install python3.10
Step 1 - Install
For the remaining steps, you will need
pip. Run the following command to upgrade your python version to support
python -m ensurepip --upgrade
Now, navigate to the destination, where the script was downloaded and run the following command:
Step 2 (Optional) - Create virtual environment
In this optional step, you will create a virtual environment. If you choose to skip this step, Django will be installed globally on your system.
Create the virtual environment:
python3 -m venv nameoftheenv
Activate the environment:
Step 3 - Install Django
Finally, install the Django framework by running the following command:
python -m pip install Django
You have installed the Django framework and now you are ready to build web applications on python.
We call you when your
website goes down
Get notified with a radically better
infrastructure monitoring platform.