Download & Install Django

To get started with using Django framework you can select a LTS (Long Term Support) version of Django and simply install it using pip.

Django versions

As of June 2020 the recommended Django version to use is Django 2.2. It is a Long Term Support (LTS) version unlike Django 3.0 and Django 3.1. The next LTS release will be Django 3.2 in April, 2021.

Django Version End of support
Django 2.2 LTS April 2022
Django 3.0 April, 2021

Pre-requisites to install Django

  • Step 1: Install Python 3.5 or above from Python.org
  • Step 2: Verify Python installation with python --version
  • Step 3: Update Python package manage, pip python -m pip install --upgrade pip

Download Install Django on Windows 10

We do not need to download an exe or dmg version of django. Django is python package under PyPI(Python Package Index). We can install python packages under PyPI using the package manager called pip.

  • Step 1: To install django with the pip run:
    pip install django==2.2
  • Step 2: Verify django installation with
    django-admin --version

Install Django on Ubuntu or Mac OSx

Ubuntu or Mac OS might refer to python as python3. In this case we can do aliasing like alias python = /usr/bin/python3. We may sometimes need to install pip as well.

  • To intall pip first run curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
  • then follow it with python get-pip.py
  • Lastly, to install django run pip install django==2.2, change version is required.

Install Django in Virtual Environment

Virtual environments can help maintain different software versions or django versions under the same operating system. It is recommended if there are many users for your computer who would like to work with different versions of python or django.

To install virtual environment simply, run:

pip install virtualenv

To create a new virtual environment named myenv, run:

virtualenv myenv

To start/activate virtual environment simply, run:

myenv/Scripts/activate

To deactivate virtual environment, run:

deactivate