Skip to content
TrySitePrice

How To Install the Django Web Framework 2 on Ubuntu 16.04

Best/Tutorial

Here are the steps to install Django 2 on Ubuntu 16.04:

  1. Install Python3 and pip3:

    nn 
    sudo apt-get update
    nsudo apt-get install python3 python3-pip
  2. Create a virtual environment for your Django project:

    nn 
    sudo pip3 install virtualenv
    nvirtualenv myenv
    source myenv/bin/activate
  3. Install Django:

    nn 
    pip install django==2.0
  4. Verify that Django is installed correctly:

    nn 
    django-admin --version
  5. Create a new Django project:

    nn 
    django-admin startproject myproject
  6. Change into the project directory:

    nn 
    cd myproject
  7. Run the development server:

    nn 
    python manage.py runserver
  8. Open your web browser and navigate to http://localhost:8000 to see the default Django landing page.

Note: This is a basic guide to get you started with Django 2 on Ubuntu 16.04. To learn more about developing with Django, I would recommend visiting the Django Project’s official website.

n(Tramadol)