How to Install Django on Ubuntu 16.04 – Django Tutorial

October 1, 2016

How to Install Django on Ubuntu 16.04

How to Install Django? Django is a powerful Python Web framework that encourages rapid development and clean, pragmatic design. Built by experienced developers, it takes care of much of the hassle of Web development, so you can focus on writing your app without needing to reinvent the wheel. It’s free and open source.

In this article, we will be using Python version 3 for Django as recommended from the official Django site. To install python3-pip from the Ubuntu repository, use the following command-


To create a symlink for PIP3 to PIP, use the following commands –


Now verify the version of PIP using the following command –


The sample output should be like this –

Installing Django with PIP

To install Django with pip, use the following command –


The sample output should be like this –


To install Django-admin, use the following command –


The sample output should be like this –


When the installation is done, check the Django version with the following command-


The sample output should be like this-

Creating a New Project

To create a new project called ‘myblog’ with the django-admin, use the following command –


Now enter into the project using CD command as shown below –


Now run the ‘manage.py’ file as shown below –


The sample output should be like this –


Now, open any favorite browser and enter the server URL. In our case it is http://127.0.0.1:8000. the sample output should be like this –

How to Install Django on Ubuntu 16.04

Now we will configure “Django admin”, wherein Django will automatically generate a database for a superuser.

But before we create a superuser, run the following command –


The sample output should be like this –


Now create the admin user as shown below –


The sample output should be like this –


The Django super user has been added, now you can use the runserver command to start Django admin. Open the browser and visit the Django admin page as shown below –


Open your browser and run server link, in this case, it should be like this –


The sample output should be like this –

How to Install Django on Ubuntu 16.04

Enter your admin user name and password. Now the sample output should be like this –

Django Tutorial
That’s it. After this article, you will be able to understand – How to Install Django 1.9 on Ubuntu, we will come up with more Linux based tricks and tips. Keep reading!

In this article you have learned How to Install Django. follow up our blog for future posts.