How to install the Django Web Framework on Windows

How to install the Django Web Framework on Windows

For the windows enthusiast, you can install Django on windows. With some necessary skills in Windows PowerShell and Python, you can easily install Django on Windows.

Django is an extremely popular web framework written in python. It is an excellent aid to programmers worldwide. With its speed, security and its wealth of features, one can see why it is one of the leading authorities on web application development. To use it one needs a general knowledge of programming and installing it is relatively easy in windows. One of the prerequisites is Python, a python virtual environment and then Django s ready to be installed.

Special note: consult HostAdvice’s  Best Python hosting and Best Django Hosting pages to find the leading web hosts in this category, including expert and user reviews.

Installing Python

Django is written in the Python language we require it installed. Download Python from >Here and get a version you prefer to use. If you already have version 3 and above, it is backwards compatible so no need to install the newest version.

Note: do not download version 2.7.x

For the purpose of this demonstration, the code used is for version 3 and above.

Choose the python version most suitable for your computer. Once downloaded, open the setup,

Installation window is displayed. Choose Customize installation and click next.

Tick all the boxes to make sure the components are installed.

Check the following boxes. Click >Install.

Setup is complete.

To verify if Python is on your system by using the PowerShell. Go to search type PowerShell Right click on it and choose run as administrator.

Update your PowerShell settings so it can run scripts, write the following code on PowerShell and press enter;

Set-ExecutionPolicy  Unrestricted

It prompts you, type y or yes.

Then type the following:

python  -V

It should show you the version currently installed on your system.

Installing a virtual environment

To install a virtual environment, type the following;

Pip  install virtualenv

To verify type;

Pip freeze

Creating a virtual environment

Create a folder called dev and navigate by typing;

mkdir dev
cd dev
ls
pwd

In the dev folder, create a new folder called newenv where our virtual environment will be stored.

mkdir newenv

Now change directory and go to that folder you created, referred as newenv here.

cd newenv

Then type

virtualenv .

the command to install the virtual environment.It is going to take some time. The virtual environment is set, activate it through your PowerShell by typing;

.\Scripts\activate

You notice that your prompt changes and start with the name of your virtual environment in brackets.

Verify, type;

pip freeze

Installing Django

Type the following command;

pip install django==1.11.5

Note that you can get whichever version of Django you want, only change the version number, e.g., ours is 1.11.5 you can get 1.11.6 if you would like.

Check version by typing

pip freeze

To leave your environment, just type the following command;

deactivate

To restart it again;

.\Scripts\activate

Conclusion

As you can see from the above guide, installing Django to the windows platform is very straightforward. You download the python programming tool, install the virtual environment and finally install Django. Get your web applications out of your mind and into the real world with Django on Windows.

 

Check out the top 3 Windows hosting services:

Ultahost
£1.92 /mo
Starting price
Visit Ultahost
Rating based on expert review
  • User Friendly
    4.3
  • Support
    4.8
  • Features
    4.5
  • Reliability
    4.0
  • Pricing
    4.8
Kamatera
£3.07 /mo
Starting price
Visit Kamatera
Rating based on expert review
  • User Friendly
    3.5
  • Support
    3.0
  • Features
    3.9
  • Reliability
    4.0
  • Pricing
    4.3
IONOS
£0.77 /mo
Starting price
Visit IONOS
Rating based on expert review
  • User Friendly
    4.5
  • Support
    4.0
  • Features
    4.5
  • Reliability
    4.5
  • Pricing
    4.3

How to Install the Django Web Framework on a Ubuntu 22.04 VPS

Brief description When building a website, similar components are required, and
less than a minute
Michael Levanduski
Michael Levanduski
Expert Hosting Writer & Tester

How to Create a Dynamic Web App with Django

Overview As a “batteries included” framework, Django
less than a minute
Mark Armistead
Mark Armistead
Author

How to install Django on a CentOS 7 VPS or Dedicated Server

When building a website, similar components are required, and you do not have to
less than a minute
Mark Armistead
Mark Armistead
Author

How to Create a Simple Web Application with the Django Web Framework

Django makes creating a web application relatively easy. This article shows you
less than a minute
Lindsey Conger
Lindsey Conger
Author
HostAdvice.com provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top