This guide walks you through a complete software installation of luma.oled on a Raspberry Pi or compatible Linux-based single-board computer. You will create an isolated Python environment, install the library and its dependencies, and configure the system permissions required to communicate with your display hardware.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/rm-hull/luma.oled/llms.txt
Use this file to discover all available pages before exploring further.
Luma OLED requires Python 3.9 or later. It has been tested on Python 3.9 through 3.14 and on Raspberry Pi models A, B2, 2, 3B, Zero, Zero W, 4B, and 5 running Raspberry Pi OS.
Create a Python virtual environment
Create an isolated virtual environment to avoid conflicts with other Python packages installed on your system.This creates a virtual environment in your home directory called
luma-env with a dedicated Python executable at ~/luma-env/bin/python.Install luma.oled
Install the latest version of luma.oled directly into the virtual environment using pip.Pip will automatically resolve and install
luma.core and any other required Python dependencies.Install system dependencies
If pip cannot install its dependencies automatically, you need to add the required system packages manually. On Raspberry Pi OS, run the following commands:These packages provide the image processing libraries that Pillow needs to compile and run correctly.If you are not using Raspberry Pi OS, consult your Linux distribution’s documentation to find the equivalent packages.
Configure interface permissions
Luma OLED communicates over hardware interfaces (SPI, I2C, GPIO) that require explicit user permissions. Add your user account to the relevant groups:Replace
pi with the username of the account that will run your luma.oled programs. You will need to log out and back in for the group changes to take effect.Verify the installation
Activate the virtual environment and confirm luma.oled is installed:Next steps
- Quickstart — connect a display and draw your first image
- Hardware setup — enable I2C or SPI in the operating system and wire up your display