Installing the Zelle Graphics Package for Python

Slide Note
Embed
Share

Learn how to install the Zelle graphics package by downloading the graphics.py file and placing it in the correct location on your PC or Mac. Verify the installation by using the import graphics command in your IDE's Shell window.


Uploaded on Sep 22, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. How to install the Zelle graphics package

  2. Zelles package This is a package written by John M. Zelle for teaching Python graphics It is available at http://mcsp.wartburg.edu/zelle/python/ The link on that page is graphics.py Do not left click on this link, right click on it This gives you a menu choose Save Link (or Target) As Save the file in a location where you will know where it is, like the Desktop It s a small file, will not take long to download Make sure it is called graphics.py when you save it

  3. The place to put graphics.py on a PC The best place to put it is within the same file structure as the Python executable On a Windows machine, assuming you do have Python installed, on the C drive, the location the file should be is C:\Python3X\Lib\site-packages\graphics.py where the 3X is the version of Python you have installed The other place you can put the file is in the same folder as your source (.py) file. This is not the best place because it means if you have several folders for several programs, you would need a copy of the graphics.py file in each of them. Clearly you do not want to name YOUR SOURCE FILE graphics.py!

  4. The place to put graphics.py on a Mac The best place to put it is within the same file structure as the Python executable On a Macintosh, the most typical place is \bin\local\user\python\ but you will have to check. You need to find the location of the python executable. This can be done from a Terminal window with the command type a python . It will return a path. Put the graphics.py file in that location. The other place you can put the file is in the same folder as your source (.py) file. This is not the best place because it means if you have several folders for several programs, you would need a copy of the graphics.py file in each of them. Clearly you do not want to name YOUR SOURCE FILE graphics.py!

  5. To verify it is installed From the Shell window in your favorite IDE, give the import graphics command If graphics.py is found, it will just come back with another prompt If graphics.py is not found, you will get an error message Note: if you put graphics.py in the same folder as your source code, make sure you have saved the source code at least once, otherwise the IDE will not know where to look for graphics.py Note: it does not matter which IDE you are using, IDLE or WingIDE. The location of the graphics.py file is the same.

More Related Content