These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
What things you need to install the software and how to install them
Give examples
A step by step series of examples that tell you how to get a development env running
It is very likely that you already have Python installed out of the box. To check if you have it installed (and which version it is), open a console and type the following command:
$ python3 --version
Python 3.6.1
You can download Python for Windows from the website https://www.python.org/downloads/windows/. Click on the "Latest Python 3 Release - Python x.x.x" link. If your computer is running a 64-bit version of Windows, download the Windows x86-64 executable installer. Otherwise, download the Windows x86 executable installer. After downloading the installer, you should run it (double-click on it) and follow the instructions there.
One thing to watch out for: During the installation, you will notice a window marked "Setup". Make sure you tick the "Add Python 3.6 to PATH" or 'Add Python to your environment variables" checkbox and click on "Install Now". And repeat When the installation completes, you may see a dialog box with a link you can follow to learn more about Python or about the version you installed. Close or cancel that dialog -- you'll be learning more in this tutorial!
All you need to do is find a directory in which you want to create the virtualenv; your home directory, for example. On Windows, it might look like C:\Users\Name\ (where Name is the name of your login).
We will make a virtualenv called myvenv. The general command will be in the format:
$ python3 -m venv myvenv
The command above will create a directory called myvenv (or whatever name you chose) that contains our virtual environment (basically a bunch of directory and files).
Start your virtual environment by running:
C:\Users\Name\Chat> myvenv\Scripts\activate
Start your virtual environment by running:
$ source env/bin/activate
Now that you have your virtualenv started, you can install Django.
Before we do that, we should make sure we have the latest version of pip, the software that we use to install Django:
(myvenv) ~$ python -m pip install --upgrade pip
Now, run pip install -r requirements.txt to install Django.
(myvenv) ~$ pip install -r requirements.txt
(myvenv) ~$ python manage.py migrate
(myvenv) ~$ python manage.py makemigrations
You need to be in the directory that contains the manage.py file. In the console, we can start the web server by running python manage.py runserver:
(myvenv) ~/Chat$ python manage.py runserver