Installing graphics.py using pip

Quickstart (TL;DR)

Use the Python 3 command pip3 to install Zelle’s graphics.py in a permanent, globally accessible location on your computer. Open a terminal prompt (such as OS X’s Terminal, or Windows’ Command Prompt) and type the command:

pip3 install --user http://bit.ly/csc161graphics

Detailed Instructions

I will break this down for the top 2 platforms: Mac, Windows.

For Apple macOS users (also applicable to Linux users):

  1. The first step is opening the potentially forbidding Terminal application. In the Finder, navigate to Applications -> Utilities -> Terminal, and double-click to open. You should see this:

    ../_images/osx-new-terminal.png
  2. Next, we will use the pip3 tool, included Python 3, to install this file. The command you should type into the terminal is this:

    pip3 install --user http://bit.ly/csc161graphics
    

    Which looks like this:

    ../_images/osx-pip-command.png
  3. After you type the above command and hit Enter, you should see the following output:

    ../_images/osx-pip-output.png
  4. ‘graphics.py’ has been installed! To confirm, you can run python3 from the terminal or run Idle and type import graphics. It should return with no errors:

    ../_images/osx-python-graphics-import.png

For Microsoft Windows users:

  1. The first step here is to properly install Python. When starting the installer for Python 3.5.1 (or later), be sure to select the installer option “Add Python 3.5 to PATH”. This step is required!

    ../_images/windows-pip-install.png
  2. Next, start a Windows Command Prompt. If you know how to do this, skip ahead. This can be started easily through a method described here, if you are unfamiliar with this.

    To do this, open a Windows Explorer window, you’ll recognize this, I’m sure:

    ../_images/windows-new-explorer.png
  3. Next, we’ll start the Windows Command Prompt. This should work in Windows 7, 8 and 10, for sure. Click in the Explorer window’s path bar (hilighted with the red circle), type cmd and hit Enter.

    ../_images/windows-explorer-run-cmd.png
  4. A new Windows Command Prompt window should appear:

    ../_images/windows-new-cmd.png
  5. Now, we install graphics.py. Type the following command in the command prompt window, and hit Enter:

    pip3 install --user http://bit.ly/csc161graphics
    
    ../_images/windows-pip-cmd.png
  6. The output of the command should look very much like this:

    ../_images/windows-pip-output.png
  7. ‘graphics.py’ has been installed! To confirm, you can run IDLE (Python 3.5 GUI) from your Start menu. When the Python Interpreter shell appears (>>>), type import graphics. It should return with no errors.

    ../_images/windows-idle-graphics.png