Jump To:
Note: For lines with multiple commands the first one is preferred, e.g. the py -<version>. The other will only work if the python version you want to use is linked to the python command.
- Go-to the python download page and download python 3.6
- Run the installation tool. Make sure the "Add python to PATH" box is checked, and under advanced settings, make sure that the pip box is checked.
- Confirm that the python version by running one of the following commands in an Administrator PowerShell window (Search for powershell, right click and run as administrator) The output should be “Python 3.6.x”
py -3.6 --versionpython --version
- Confirm that you have pip installed by running one of the following commands (the output should be
pip 9.0.1 from <path> (python 3.6))py -3.6 -m pip --versionpython -m pip --version
- Install virtualenv from pip with one of the following commands
py -3.6 -m pip install virtualenvpython -m pip install virtualenv
- Create a directory where you want your application source code to live (perhaps in your documents folder, on the desktop, or in the C:/ drive)
cd C:\mkdir sds_pythoncd C:\sds_python
- Create the virtual environment using one of the following commands
py -3.6 -m virtualenv <env_name>python -m virtualenv <env_name>
- Activate the virtual environment in your current shell from your source code directory (after activating “(<env_name>)” should appear in front of your terminal prompt)
- Powershell
.\<env_name>\Scripts\activate.ps1
- Cmd
.\<env_name>\Scripts\activate.bat
- Powershell
- Confirm that python and pip are correctly linked
- Python
- Run
python --version - Should return
Python 3.6.x
- Run
- Pip
- Run
pip --version - Should return
pip 9.0.1 from <path> (python 3.6)
- Run
- Python
- Install Django in the virtual env with the following command
pip install django
- Confirm that Django is correctly installed by running the following command (should return
2.0.1or something similar)python -m django --version
- To exit from the virtual environment execute
deactivateto re-enter the environment go to the folder that you originally created it in and execute step 8.
- Go-to the python download page and download python 3.6
- Run the installation tool. Make sure the "Add python to PATH" box is checked, and under advanced settings, make sure that the pip box is checked.
- Confirm that the python version by running one of the following commands in a terminal window, which can be opened via spotlight (the output should be
Python 3.x.x)python3 –version
- Install python 3.X and it's corresponding pip using your distro’s specific package manager, details on the different package managers and package names per Linux distribution can be found here https://packaging.python.org/guides/installing-using-linux-tools/
- Debian/Ubuntu:
sudo apt-get install python3 python3-pip - Fedora 21:
sudo yum install python3 python3-wheel - Fedora 22:
sudo dnf install python3 python3-wheel - Arch:
sudo pacman -S python python-pip
- Debian/Ubuntu:
- Confirm that the python version by running one of the following commands in a terminal window (the output should be
Python 3.x.x)python3 --version
- Change directories to where you want to be developing your application
- Create the virtual environment using the following command
python3 -m virtualenv <env_name>
- Activate the virtual environment in your current shell from the directory you created the environment in (after activating
(env)should appear in front of your terminal prompt)source ./<env_name>/bin/activate
- Confirm that python and pip are correctly linked
- Python
- Run
python --version - Should return
Python 3.6.x
- Run
- Pip
- Run
pip --version - Should return
pip 9.0.1 from <path> (python 3.6)
- Run
- Python
- Install Django in the virtual env with the following command
pip install django