To install Django, a popular open-source web framework, on Ubuntu 16.04, follow these steps:
python3-pip package, which provides the pip3 command for installing Python packages, by running the following command:sudo apt-get install python3-pip
pip3 to install Django by running the following command:pip3 install django
This will install Django and any dependencies required.
python3 -m django --version
This will display the version of Django that was installed.
django-admin startproject myproject
Replace myproject with the desired name for your project. This will create a new directory with the same name, containing the skeleton of a Django project.
cd myproject
python3 manage.py runserver
This will start the server and print the URL at which the project is available. By default, the server will listen on port 8000.
That's it! Django is now installed and set up on your Ubuntu 16.04 system. You can use it to develop web applications and serve them using the Django development server.