Learn Django
Install PIP
PIP is a package manager for Python. It makes it easy to install and manage Python applications like Django. PIP will be the primary way that third-party Python packages are installed in this course. Here are the instructions to install it.
On a Mac
Instructions for setting up PIP on a Mac.
- Open a terminal
- Type
sudo easy_install pip
- Test the installation by typing
pip
- the output should look like this:
1 2 3
$ pip Usage: pip COMMAND [OPTIONS] You must give a command (use "pip help" to see a list of commands)
On Windows
Instructions for setting up PIP on Windows.
- Open a command prompt
- Type
cd c:\
- Type
mkdir Utils
- Type
cd Utils
- Type
notepad ez_setup.py
to launch notepad - Securely open ez_setup.py and copy this into the notepad window and save it
- Type
python ez_setup.py
at the command prompt. This will install setuptools which will then be used to install PIP - Type
notepad get-pip.py
to launch notepad - Securely open get-pip.py in a browser. Copy the text and paste it into the notepad window that was opened in the previous step. Save the file
- Go back to the command prompt and type
python get-pip.py
. This will install PIP - The last step is to add the PIP install path to the Windows Environment Variables path. This will allow you to run Python from any directory when using the Command Prompt. To do this, open System Properties, click on the Advanced tab, then click on the Environment Variables button. When the new pane opens, there will be a System Variables window; scroll in this window until you find the Path variable. Select it, then click on Edit... Put your cursor at the very end of this and add this text
;C:\Python27\Scripts
. Click OK until you've confirmed all dialog boxes - To verify PIP was installed correctly, close all Command Prompts, open a new one, and type
pip
- the help file should load