How To Install Django On Windows

how to set up windows 10
This document will direct you through installing Python 3.5 and Django on Windows. It also provides instructions for installing virtualenv and virtualenvwrapper, which will make it easier to work with Python projects. This is meant like a beginner’s guide for users implementing Django projects and will not reflect how Django needs to be installed when developing patches for Django itself.

The stages in this guide have already been tested with Windows 7, 8, and 10. In other versions, the steps will be similar. You will need to know about using the Windows command prompt.

Install Python¶



Django is really a Python web framework, thus requiring Python being installed with your machine. At the time of writing, Python 3.5 would be the latest version.

To install Python on the machine visit https://python.org/downloads/. The website should will give you a download button for that latest Python version. Download the executable installer and run it. Check the box beside Add Python 3.5 to PATH then click Install Now.

After installation, open the command prompt and view that the Python version matches the version you installed by executing:

About pip¶



pip is often a package manage for Python. It makes installing and uninstalling Python packages (for example Django!) a breeze. For the rest of set up ., we’ll use pip to fit Python packages on the command line.

To install pip on the machine, head over to https://pip.pypa.io/en/latest/installing/, and adhere to the Installing with get-pip.py instructions.

Install virtualenv and virtualenvwrapper¶



how to setup windows 10virtualenv and virtualenvwrapper give you a dedicated environment per Django project you create. While not mandatory, this can be considered a best practice and may save you in time the future when you’re willing to deploy assembling your garden shed. Simply type:

Then make a virtual environment for assembling your shed:



The virtual environment will likely be activated automatically and you’ll see “(myproject)” beside the command prompt to designate that. If you take up a new command prompt, you’ll have to activate environmental surroundings again using:

Install Django¶



Django may be installed easily using pip as part of your virtual environment.

In the command prompt, make sure your virtual environment is active, and execute the next command:

This will download and install the most recent Django release.



After not hard to install has completed, you may verify your Django installation by executing django-admin --version from the command prompt.

See Get your database running for facts about database installation with Django.



Common pitfalls¶

If django-admin only displays the exact help text regardless of what arguments it can be given, there's probably a problem with the file association in Windows. Check if there exists more than one environment variable set for running Python scripts in PATH. This usually occurs when there exists more than one Python version installed.
Next Post Previous Post
No Comment
Add Comment
comment url