In this lesson, I will show you how to install Python 3.6 and set up Django 2.0 in 6 easy steps using virtualenv and pip.
Step 1: Download and Install Python
Download the Python 3.6.3 from the website link below
Make sure you choose the installer that matches your operating system whether 32 or 64bit.
Create a folder in drive C or D and call it python36
Run the installation. Choose custom installation and make sure the following is selected:
- Install for all users
- Add Python the environment variables
- Create shortcuts for installed applications
- Precompiled standard library
Install python to the folder python36 that you created.
Step 2: Create a Workspace (Folder)
Just create another folder in your drive C or D and call it workspace
(you can also use another name)
Step 3: Install virtualenv
This is a tool that helps you create something similar to a web server. To install virtualenv:
Open Windows PowerShell(run as Admnistrator) and enter the command:
pip install virtualenv
Step 4: Create a Folder to Keep you Websites
To create this folder (here I call it local_sites):
Navigate to the Workspace folder you created and run the command:
This commands creates the folder.
You can go the location of your workspace from ‘My Computer’ to verify that the virtual environment have been created. You can open it and verify it contains the items as shown below:
Step 5: Activate the Development Environment
This means that the folder becomes a web folder such that the web pages inside can be access from your browser over HTTP
To activate the virtualenv, in the command prompt, navigate to the script directory and run the command