How To Install the Django Web Framework 2 on Ubuntu 16.04
Here are the steps to install Django 2 on Ubuntu 16.04:
-
Install Python3 and pip3:
sudo apt-get update sudo apt-get install python3 python3-pip -
Create a virtual environment for your Django project:
sudo pip3 install virtualenv virtualenv myenv source myenv/bin/activate -
Install Django:
pip install django==2.0 -
Verify that Django is installed correctly:
django-admin --version -
Create a new Django project:
django-admin startproject myproject -
Change into the project directory:
cd myproject -
Run the development server:
python manage.py runserver -
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.
(Tramadol)