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
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)
Instructions for setting up PIP on Windows.
- Open a command prompt
notepad ez_setup.pyto launch notepad
- Securely open ez_setup.py and copy this into the notepad window and save it
python ez_setup.pyat the command prompt. This will install setuptools which will then be used to install PIP
notepad get-pip.pyto 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