Python Django Installation & Getting Started














































Python Django Installation & Getting Started



  Steps For Installing Django:

Let's work on installing Django from scratch.

Django is a rapid development framework with a great community working on making it better and better with time, but at the end of the day, it is just a python package and we can conveniently install python packages with the help of pip. Let's install Django by following the steps below:

Step 1: Open Windows Powershell or any other terminal on your computer.

Step 2: Enter the command below and press enter:

pip install django

This will start installing Django on your computer but there is a chance that you will receive below error while trying to install Django:

pip is not recognized as an internal or external command.

If that's the case, you have not set up python correctly and you need to click here and watch this video where I walk you through the steps on solving this error. I have explained the reason and solution to this error in great detail. But if you have python setup correctly on your computer this error should not pop up!

Note: It is possible that multiple versions of Python are installed in your pc. If you are a beginner and don't have any prior experience in working with multiple versions of Python, I would suggest removing all the Python versions and then installing the latest Python version.

3:35 - Verifying The Installation Of Django

Now, we will check whether the Django is correctly installed or not.

Open Windows Powershell and fire the command below:

python -m django --version

If you are able to see the version number, Django is properly installed on your laptop or computer. In case you notice any error, please ask your query in the QnA section, and I will try to help you out.

4:00 - Pycharm IDE : 

Throughout this entire Django course, I am going to use Pycharm IDE. You are free to use the VS Code or any other IDE of your choice.

Download the community edition of Pycharm IDE from here. It is open-source and totally free to use IDE. You can purchase the professional edition, which has special support for Django, but if you are a beginner, I recommend using the free community edition. Personally, I have never purchased the professional edition of Pycharm.

4:45 - Creating First Project :

After successfully downloading the Pycharm IDE, follow the steps given below to create your first project.

Step 1: Click on "Create New Project"

Step 2: Select the location and give a unique name to your project (Make sure to not use Django, python or some module's name as the project name)

Step 3: Click on "Create."

Note for Pycharm Users: Please do not select a virtual environment as your python interpreter if you are unfamiliar with the concept of a virtual environment. Click on "Project Interpreter" and then select your Python interpreter by clicking on the existing interpreter in Pycharm.


Comments