Category: Django

Here is the step-by-step process to install Django on your system

1. Install Python

Django requires Python, so make sure Python is installed on your system.

  • Check Python version:

or


2. Install pip (Python Package Manager)

Pip usually comes pre-installed with Python. To verify, run:

If not installed, you can install pip using:

python -m ensurepip --upgrade

3. Create a Virtual Environment (Optional but Recommended)

It’s best to create a virtual environment for Django projects to avoid conflicts with other projects.

  • Create virtual environment:

Activate virtual environment:

  • Windows:

macOS/Linux:

4. Install Django

Once the virtual environment is activated, install Django using pip:

To verify the installation, run:

5. Create a Django Project

You can now create a Django project:

django-admin startproject myproject
cd myproject

6. Run the Development Server

To test your Django installation, start the development server:

python manage.py runserver

Open your browser and visit http://127.0.0.1:8000/. If you see the Django welcome page, you’re good to go!