1.12" Mono OLED (128x128, white/black) Breakout
Raspberry Pi 400 running the latest Pi OS, fully updated.
Starting on the shop page and following the get up and running instructions got me this.
udo pip3 install git+git://github.com/rm-hull/luma.oled.git#egg=luma.oled
kyrie@pi400:~ $ sudo pip3 install git+git://github.com/rm-hull/luma.oled.git#egg=luma.oled
[sudo] password for kyrie:
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
For more information visit http://rptl.io/venv
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
kyrie@pi400:~ $
So I back tracked and clicked the link to
Luma Python Library
The on to the install instructions.
install instructions
And finally to the software install instructions.
software install instructions
Which led me down this rabbit hole?
python3 -m venv ~/luma-env
~/luma-env/bin/python -m pip install --upgrade luma.oled
kyrie@pi400:~ $ ~/luma-env/bin/python -m pip install --upgrade luma.oled
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting luma.oled
Downloading https://www.piwheels.org/simple/luma-oled/luma_oled-3.15.0-py3-none-any.whl.metadata (27 kB)
Collecting luma.core>=2.4.1 (from luma.oled)
Downloading https://www.piwheels.org/simple/luma-core/luma_core-2.5.3-py3-none-any.whl.metadata (30 kB)
Collecting pillow>=9.2.0 (from luma.core>=2.4.1->luma.oled)
Downloading pillow-12.3.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.metadata (9.1 kB)
Collecting smbus2 (from luma.core>=2.4.1->luma.oled)
Downloading https://www.piwheels.org/simple/smbus2/smbus2-0.6.1-py2.py3-none-any.whl.metadata (7.1 kB)
Collecting cbor2 (from luma.core>=2.4.1->luma.oled)
Downloading cbor2-6.1.3-cp313-cp313-manylinux_2_28_aarch64.whl.metadata (5.5 kB)
Downloading https://www.piwheels.org/simple/luma-oled/luma_oled-3.15.0-py3-none-any.whl (33 kB)
Downloading https://www.piwheels.org/simple/luma-core/luma_core-2.5.3-py3-none-any.whl (72 kB)
Downloading pillow-12.3.0-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (6.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.3/6.3 MB 1.2 MB/s eta 0:00:00
Downloading cbor2-6.1.3-cp313-cp313-manylinux_2_28_aarch64.whl (457 kB)
Downloading https://www.piwheels.org/simple/smbus2/smbus2-0.6.1-py2.py3-none-any.whl (11 kB)
Installing collected packages: smbus2, pillow, cbor2, luma.core, luma.oled
Successfully installed cbor2-6.1.3 luma.core-2.5.3 luma.oled-3.15.0 pillow-12.3.0 smbus2-0.6.1
kyrie@pi400:~ $
kyrie@pi400:~ $ sudo apt-get update
Hit:1 http://deb.debian.org/debian trixie InRelease
Hit:2 http://deb.debian.org/debian trixie-updates InRelease
Hit:3 http://deb.debian.org/debian-security trixie-security InRelease
Hit:4 http://archive.raspberrypi.com/debian trixie InRelease
Reading package lists... Done
kyrie@pi400:~ $ sudo apt-get install python3 python3-pip python3-pil libjpeg-dev zlib1g-dev libfreetype6-dev liblcms2-dev libopenjp2-7 libtiff5 -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'libfreetype-dev' instead of 'libfreetype6-dev'
E: Unable to locate package libtiff5
kyrie@pi400:~ $ sudo apt-get install python3-imaging
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package python3-imaging is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
python3-pil:armhf python3-pil
E: Package 'python3-imaging' has no installation candidate
kyrie@pi400:~ $ sudo apt-get install python3-pil
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-pil is already the newest version (11.1.0-5+deb13u4).
python3-pil set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
kyrie@pi400:~ $ sudo usermod -a -G spi,gpio,i2c kyrie
kyrie@pi400:~ $
kyrie@pi400:~ $ sudo pip3 install git+git://github.com/rm-hull/luma.oled.git#egg=luma.oled
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
For more information visit http://rptl.io/venv
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
kyrie@pi400:~ $
I think, somewhere in there, I was supposed to activate the virtual environment?
But where and when? Maybe I missed it but, why was that not mentioned?
If thats not it what am I doing wrong?