A Beginner’s Guide: How to Install Django on Windows

Introduction: If you are new to Django, let me explain, Django is a high level Python web framework. It is famous for it is simplicity and versatility making developers preferred their best choice worldwide. If you are taking your first step in the web development world and you are considering the Django framework as your choice, then you are in the right place. In this post, I will explain step by step guide to install Django on a Windows operating system.

Step 1: Set Up Python: Do you know already, that Django is the framework of Python, Before installing Django, You need to install Python first on your Windows Operating System. If you have not already installed Python, then head over to the official Python Website (https://www.python.org/downloads/) and download the latest version which must be compatible with your system. but I have installed Python 3.11.5 because when I deploy my Django project on the live server, It provides me Python 3.11.5 version mostly. So I chose Python 3.11.5 and I also Recommend you choose this one if you will plan to deploy your Django Project later on. make sure to check the box that says ” Add Python to PATH” to simplify the Python setup Process.

Step 2: Install Django using pip: Once Python is Fully Installed, Then Open up CMD and type ‘python –version‘ OR ‘Python -V’ without a quote If it shows the version of Python it means Python is successfully installed. If any error please post in the following comment box and definitely I will help. Now Follow these simple steps to install Django on the Windows Operating System:

  1. Open Command Prompt: Press ‘Win + R,’ type cmd, and hit Enter to open Command Prompt.
  2. Install Django: Type the following command press Enter And wait for a few minutes to let Django Successfully installed on your Windows Operating System Globally:

Step 3: Verify Installation: After the Django installation is complete, Now you can verify if Django is installed correctly by typing this command in the CMD:

If Django is installed successfully on your system, it will display the installed Django version on the Command prompt.

Step 4: Verify Django Installation: To check to make sure that Django is installed correctly on your Windows operating system, Now you can create a sample Django project. Follow the following steps to create your first Django Project:

  1. Create a New Django Project: Choose a directory means to create any folder where you want to create your Django project and navigate to the created directory in Command Prompt.
  2. Use the following command to create a new Django project:

Step 5: Verify Project Creation: If you have created your first project, navigate to the project directory (myproject in this case) and run the development server using the following command: Note: “myproject” is the name of a project. You can choose any name of your project accordingly.

If the server starts without errors, open a web browser and open this URL in your favorite browser http://127.0.0.1:8000/. You should see the Django welcome page, It confirms that your Django installation was successful without any issues.

Conclusion: Congratulations! Django is installed successfully on your Windows Operating System. With Django up and running, you are now ready to dive into web development World using one of the most powerful and popular Python web frameworks available. As you explore Django further, Keep touch with us on social media or keep visiting our blog thanks. Happy coding!

Related:

1 thought on “A Beginner’s Guide: How to Install Django on Windows”

Leave a Comment