Skip to main content

Desktop CMU Graphics logo

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 by CMU CS Academy, a Carnegie Mellon University project which develops free-to-use middle and high school computer science curriculum.

This package, including its documentation, is licensed under the BSD 3-Clause license.

Installation

Choose zip or pip

There are two different ways to install Desktop CMU Graphics on a device:

  1. (Mac and Windows only) Use the zip file installer that is available for download on the CMU CS Academy website.
  2. (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 CMU Graphics

Run the following command:

pip install cmu-graphics

Getting Started

To 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 our documentation page.

Teacher Support and Documentation

If 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:

Highlighted teacher support tab

If you are an educator but do not have an account with CMU CS Academy, you can register 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 our documentation page.

Features specific to Desktop CMU Graphics

app.cursorVisible

Setting app.cursorVisible = False in your code will cause the computer's mouse pointer to be hidden within your window. You can set app.cursorVisible = True to make it visible again.

Fullscreen mode

Your programs can call app.enableFullscreen() to use a fullscreen mode where the window contents fill the entire screen. Call app.disableFullscreen() to return to a normal window.

onResize

The event handler onResize is available in all projects. See the web CPCS documentation for details. (This event handler is only available in CPCS mode on the web.)

Metadata

Release files for cmu-graphics 3.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cmu-graphics 3.0.2
File Size Uploaded Provenance Actions
cmu_graphics-3.0.2.tar.gz 76.1 kB With provenance Details for cmu_graphics-3.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cmu-graphics 3.0.2
File Interpreter ABI Platform Actions
cmu_graphics-3.0.2-py3-none-any.whl Python 3 none any Details for cmu_graphics-3.0.2-py3-none-any.whl

Total release size: 155.2 kB

Release files / cmu_graphics-3.0.2.tar.gz

Download URL cmu_graphics-3.0.2.tar.gz
Size 76.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f4107a83d83405ebd8008df86b5716cc7f4cc034d9429d598f73e959f80db5b6
BLAKE2b-256 checksum
How to use checksums
bb4af32b4cee4749f5573e6b8f6b01c651ae102ec1e778830c03d4b3c1d9f00f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Release files / cmu_graphics-3.0.2-py3-none-any.whl

Download URL cmu_graphics-3.0.2-py3-none-any.whl
Size 79.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
10ef13c1f9b4010aef2541e0fa5ea0ef378ec8022c9511280780b4d775e42eef
BLAKE2b-256 checksum
How to use checksums
7fca5de5b637f4b79d9d520a0cb872e35f4cc9399a6b5f5571696b2f029a91f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Security for cmu-graphics 3.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cmu_graphics-3.0.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.0.2 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page