The python package installer allows you to install all types of python-related software (and code) include Django, Virtual environments (virtualenv), Python Requests, and more.
Video: Installation Video Series
-
Download The Latest Python 3 Release. It's currently Python 3.6.0 and the download link is listed under files and choose the appropriate one for your system. 64-bit likely works for you. Note: Python 3.6 is preferred for Coding for Entrepreneurs tutorials. (We have upgraded from version 2.7)
-
Run Standard Installation Process
-
Add Environment Variables to setup up Command Prompt to work with Python. This is where we'll run the bulk of our commands. (Works on Windows XP, 7, 8, 10 & Up)
- Open
Control Panel
- Select
System and Security
- Select
System
- Select
Advanced System Settings
- Select
Advanced
Tab - Select
Environment Variables
- Under "User variables for " select the variable
PATH
then hitedit
- If
PATH
is not a current user variable, selectnew
and setVariable Name
asPATH
- Add the following to the end of whatever is written in the
Variable Value
(if anything):
C:\Python36;C:\Python36\python.exe;C:\Python\36\Lib\site-packages;C:\Python36\Lib\site-packages\django\bin;C:\Python36\Scripts;
If something was already in
Variable Value
the end result will look something like:C:\Windows\System32;C:\Python36;C:\Python36\python.exe;C:\Python\36\Lib\site-packages;C:\Python36\Lib\site-packages\django\bin\;C:\Python36\Scripts;
- Open
-
Open a new
Command Prompt
window and typepython
if you see something like:Python 3.6.0 (default, Feb 13 2017, 13:18:45) >>>
You have
Python
successfully installed. You can now exit python:>>> exit()
Pip is the Python Package Installer which allows you to install things like Django, Virtualenv, Requests, and more to your local computer. A must-have for developing with Python.
-
Save the "get-pip.py" file to your Desktop. You can find the file here or at the docs.
-
Open Command Prompt and do:
C:\ > cd Desktop C:\ > python get-pip.py
-
Now "pip" should work system wide. The following Commands will now work:
C:\ > pip install virtualenv C:\ > pip freeze C:\ > pip install Django==1.10.5
-
If you can't get virtualenv working, just work outside of it. Just remember that different software versions do not always work well. Revisit installing virtualenv once you have a better grasp of Django.
-
You may need to open a new command prompt window to work correctly.
-
Having trouble installing PIP? Let's try using setuptools.
This assumes you installed Python version 3.6 successfully. To test, open command prompt and type:
C: \ > python
>>> exit()
If you can do the above, you have python installed on your computer.
-
Save the "ez_setup.py" file to your desktop.
-
Open Command Prompt and do:
> cd Desktop
> python ez_setup.py
> easy_install pip
- Now "pip" should work system wide. The following Commands will now work:
> pip install virtualenv
> pip freeze
> pip install Django==1.10.5
You're now ready to start using Python Packages like Django!
Cheers!