import mip
mip.install("pygraphics", index="https://PyDevices.github.io/mip")The package path on mip is micropython/pygraphics/ (import name
pygraphics). Older installs that used MIP name graphics should reinstall
under the new name after the next publish.
Copy the pygraphics/ package folder onto sys.path (from
lib/pygraphics/ in this repo, or from mip).
To link the native cmod into a CircuitPython unix build (out-of-tree
Extending CircuitPython
layout via spike + apply_cp_patches.sh — see the
repository README):
# siblings: circuitpython/ and pygraphics/
./apply_cp_patches.sh --apply
cd ../circuitpython/ports/unix && make -j VARIANT=coverageSee the cmods workspace for an easier way to build this repo with other user C modules (MicroPython) or extensions (CircuitPython).
pip install \
-i https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple/ \
pydevices-pygraphicsEach TestPyPI release includes a pyemscripten_2026_0_wasm32 wheel (same semver).
micropip selects it automatically:
import micropip
await micropip.install("pydevices-pygraphics", index_urls="https://test.pypi.org/simple/")| Role | Current | Retired (do not use) |
|---|---|---|
| Import | pygraphics |
graphics |
| Pure-Python pip | Not published; use MIP | pygraphics |
| Native/C pip | pydevices-pygraphics |
pygraphics, graphics-cmod |
| MIP | pygraphics |
graphics |
TestPyPI may still list the old project names until they age out; install the current names above.