banner



How To Install Graphics In Python

Contents

  • Installing graphics.py using pip

    • Quickstart (TL;DR)

    • Detailed Instructions

      • Apple macOS & Linux Users

      • Microsoft Windows Users

      • Jupyter Notebook Users

Quickstart (TL;DR)¶

Use the Python 3 control pip3 to install Zelle'due south graphics.py in a permanent, globally accessible location on your computer. Open up a terminal prompt (such every bit Bone X's Terminal, or Windows' Command Prompt) and type the control:

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

Detailed Instructions¶

I will break this downward for the most common Python environments: Mac, Linux, Windows, and Jupyter Notebook.

Apple macOS & Linux Users¶

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

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

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

    Which looks like this:

    ../_images/osx-pip-command.png
  3. Afterwards you lot type the above command and striking Enter, you should run across the following output:

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

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

Microsoft Windows Users¶

  1. The outset stride here is to properly install Python. When starting the installer for Python 3.five.1 (or later), be sure to select the installer option "Add Python 3.X to PATH". This step is required!

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

    To do this, open a Windows Explorer window, you'll recognize this, I'm certain:

    ../_images/windows-new-explorer.png
  3. Next, we'll showtime the Windows Command Prompt. This should work in Windows 7, eight and x, for certain. 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, nosotros install graphics.py . Blazon the post-obit 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 tin can run IDLE (Python 3.X GUI) from your Start card. When the Python Interpreter shell appears ( >>> ), blazon import graphics . Information technology should return with no errors.

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

Jupyter Notebook Users¶

Earlier nosotros begin: please note that Jupyter Notebook is OPTIONAL to use in this course.

  1. Using your already established process for usage, please start Jupyter. You should see the Jupyter file browser.

    ../_images/jupyter-file-browser.png
  2. Go to the "New" menu, and select the "Terminal" option.

    ../_images/jupyter-new-menu.png
  3. A new browser tab opens, displaying a terminal. In that final, blazon (or, copy and paste) the following:

                                                pip3                      install                      --                      user                      http                      :                      //                      bit                      .                      ly                      /                      csc161graphics                    
    ../_images/jupyter-new-terminal.png
  4. The output of the command should look very much like this:

    ../_images/jupyter-terminal-pip.png
  5. The module should have successfully installed, and is ready for utilise. Delight annotation, you either have to create a new notebook, or restart the kernel of an existing notebook before y'all continue.

Source: https://www.pas.rochester.edu/~rsarkis/csc161/python/pip-graphics.html

Posted by: schaferspern1991.blogspot.com

0 Response to "How To Install Graphics In Python"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel