Package: cmu-graphics
Desktop CMU Graphics is an offline version of CMU Graphics, a
persistent-object graphics package geared towards beginner computer science
students. CMU Graphics and its desktop version are maintained byCMU CS Academy, a Carnegie Mellon University
project which develops free-to-use middle and high school computer science
curriculum.Desktop CMU Graphics works withPython 3.6-3.11and is compatible withReplitandCoding Rooms(see the "Replit" and "Coding Rooms" sections below). This
package, including its documentation, is licensed under theBSD 3-Clause license.InstallationChoose zip or pipThere are two different ways to install Desktop CMU Graphics on a device:(Mac and Windows only) Use thezip file installerthat is available
for download on the CMU CS Academy website.(Mac, Windows, and Linux) Use pip, Python’s built-in package-managing software.Both methods come with their own advantages and limitations. If you're in doubt
about which to choose, the zip file installer is the most likely to succeed. It
should work regardless of most restrictions in place on school-distributed devices.For those using devices with Linux operating systems, or for those who are
familiar with the command line/terminal, the pip version of the
package offers a larger degree of versatility.The remainder of these installation instructions are only for the pip version.Install dependenciesIf you're using Windows, you don't need to install any dependencies. Skip ahead to "Install CMU Graphics" below.If you're using a Mac, installHomebrew.If you're using a Mac or Linux, install the software packages needed by pycairo. Read theirgetting started pagefor instructions.Install CMU GraphicsRun the following command:pip install cmu-graphicsGetting StartedTo run our graphics framework, include the following line at the top of your
Python file:from cmu_graphics import *At the end of your Python file, add this line:cmu_graphics.run()From there, the syntax for using the graphics package is identical to the
online version of the framework. You can find more details about how to use the
graphics framework here on ourdocumentation page.Teacher Support and DocumentationIf you are a teacher with a CMU CS Academy Account and you have questions about
CMU Graphics, remember that you can reach out to us through the Support tab on
the left side of the CMU CS Academy website:If you are an educator but do not have an account with CMU CS Academy, you canregister for an account here.If you are a student, or you are exploring Desktop CMU Graphics,
there are plenty of resources to help you get started with
the framework. Students can reach out to their teachers for questions about
CMU Graphics, and a full reference documentation for the graphics
framework is available on ourdocumentation page.ReplitDesktop CMU Graphics is compatible withReplit. To use
the package on the Replit website:Create a new repl. Choose "Python-CMUGraphics" as the language.Run your code!Coding RoomsDesktop CMU Graphics is compatible withCoding Rooms. To use the package on the
Coding Rooms website:Visitthis linkto create a workspaceClick "Start Coding Python for Free Now"Click the blue "View Desktop" button above the shellRun your code!