How to Set up Python and Django On Windows 10 for Absolute Beginners

How to Set up Python and Django On Windows 10 for Absolute Beginners
Photo by Clément Hélardot / Unsplash


So, first off, what are Python and Django? In its most basic sense, Python is an easy to learn, productive, portable, and free programming language.

And Django is a python based web framework that makes coding easier for you. You can build blogs, websites, and apps using its open-source software and find all the codes you need on GitHub.

For this tutorial, I’ll be using Windows 10, system 32. The errors you get might differ if you’re using a different operating system.

Let’s get started.

1-Downloading & Setting up Python

You only need to visit Python’s official website and download the version you want for free with one click. Easy peasy. The file should be about 25 MB.

Then you click on that downloaded file and select “Install Now”, “Install Launcher for All Users” and “Add Python to PATH” options on the opened window.

These are necessary steps because if you don’t add Python on PATH, you won’t be able to run commands because the system won’t recognize “Python”.


In the following screen, there’s a “Disable Path length limit” option. Windows typically has a limit of 260 characters on PATH. Thus, PATHS that exceed this limit can result in unwanted errors. So it’s recommended to disable it.

And congratulations, now the setup of python must be done!


Now, let’s make sure of this.

2- Verification of Download

To open the command line, use the shortcut Win + R  (the windows button and letter R on your keyboard)

Then type cmd and go.
The setup must be complete if you see the following screen when you type python:

Microsoft Windows [Version 10.0.19044.1826]

(c) Microsoft Corporation. All rights reserved.
C:\Users\admin>python

Python 3.10.6

⛔Possible Error:

The computer might be automatically directing you to Python on Microsoft Store once you run "python", then you need to find and download the right version of Python as well.

3- Django Set Up

Now that our python installation is complete, we can easily install Django by once again typing Win + R + cmd on the keyboard.
Then run the following command:

C:\Users\admin>pip install Django

Now all you need to do is to wait for a few seconds for the installation and then everything should be ready for your use!

⛔Possible Error: 

After the setup, if you received a WARNING saying that the python is not on PATH, that means you skipped the add it on PATH button and now you’ll need to do it yourself. For this, I recommend uninstalling and then again, installing python and making sure you select the box because this is the easiest way.


Conclusion

So, this is how you set up python and Django on Windows 10. It might be frustrating to deal with all the errors at the beginning, but just be patient and keep going. In time, you’ll get used to it and everything will be much easier.

Setting up Python and Django was the first step into your coding journey, and now that you have the base of the building, you can construct whatever you like, in the way you want.








Open-source Apps

9,500+

Medical Apps

500+

Lists

450+

Dev. Resources

900+