0
0
Djangoframework~5 mins

Django installation with pip

Choose your learning style9 modes available
Introduction

Django is a tool to help build websites quickly. Installing it with pip lets you add Django to your computer easily.

When starting a new website project using Django.
When you want to update Django to the latest version.
When setting up a development environment on a new computer.
When you need to install Django inside a virtual environment to keep projects separate.
Syntax
Django
pip install django
Use this command in your terminal or command prompt.
Make sure Python and pip are installed before running this.
Examples
Installs a specific Django version (4.2 here).
Django
pip install django==4.2
Updates Django to the newest version available.
Django
pip install --upgrade django
Runs pip through Python to avoid some path issues.
Django
python -m pip install django
Sample Program

This installs Django and then shows the installed version to confirm it worked.

Django
pip install django
python -m django --version
OutputSuccess
Important Notes

Use a virtual environment to keep your Django projects organized and avoid conflicts.

Run pip list to see installed packages including Django.

If you get permission errors, try adding --user to the install command.

Summary

Django installation with pip is simple and fast.

Use pip install django to add Django to your system.

Check the version with django-admin --version or python -m django --version.