TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: ALL
from: DENNIS LEE BIEBER
date: 2019-12-18 16:35:00
subject: Re: No module named micro

On Wed, 18 Dec 2019 20:57:34 +0000, RobH  declaimed the
following:


>
>Ok, my apologies, as I could NOT install the micropython-ssd1327-1.0.0
>library because after I DID install micropython from here:
>
>https://www.raspberrypi.org/forums/viewtopic.php?t=191744
>
>I received the said error about no module called micropython

 Okay, if you built micropython, and the test (section 4) runs, I'd
think the next move would be to follow step 5 to install the micropython
package.

>It looks like the Adafruit_CircuitPython_SS1327 library can't be
>installed then, and the micropython-ssd1327-1.0.0 library can't be used
>due to micropython not being invoked???
>
 The Adafruit library requires /displayio/ but on Linux the
adafruit_blinka interface library only provides

"""
This repository contains a selection of packages mirroring the
CircuitPython API on hosts running micropython. Working code exists to
emulate the CircuitPython packages;

    board - breakout-specific pin identities
    microcontroller - chip-specific pin identities
    digitalio - digital input/output pins, using pin identities from
board+microcontroller packages
    bitbangio - software-driven interfaces for I2C, SPI
    busio - hardware-driven interfaces for I2C, SPI, UART
    time * - substitute functions monkey-patched to time module
"""
... No displayio (nor many of the libraries shown
https://circuitpython.readthedocs.io/en/4.x/shared-bindings/index.html )

 Micropython requires you to invoke it explicitly:

/micropython 

>It now seems that the said oled display can't be used with a raspberry
>pi, as it needs the ssd1327 library.
>
 I don't have the display to fully illustrate, but...

https://luma-oled.readthedocs.io/en/latest/install.html and
https://luma-oled.readthedocs.io/en/latest/python-usage.html

... gave me

pi@rpi3bplus-1:~$ sudo apt install python3-dev libfreetype6-dev libjpeg-dev
build-essential libopenjp2-7 libtiff5
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.6).
 
The following NEW packages will be installed:
  libjpeg-dev libjpeg62-turbo-dev
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 236 kB of archives.
After this operation, 543 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://raspbian-us.ngc292.space/raspbian buster/main armhf
 
Setting up libjpeg-dev (1:1.5.2-2) ...
pi@rpi3bplus-1:~$ pip3 install --upgrade luma.oled
Looking in indexes: https://pypi.org/simple,
https://www.piwheels.org/simple
Collecting luma.oled
  Downloading
https://files.pythonhosted.org/packages/fd/70/b03e0cf2040113db644a220d546a9c429
07c4884a898722312c83b0f5603/luma.oled-3.3.0-py2.py3-none-any.whl
Collecting luma.core>=1.12.0 (from luma.oled)
  Downloading
https://files.pythonhosted.org/packages/a7/36/f10ac3202221c479bae89e3226e57dcbf
31c08f4d9e5743f32e193147a22/luma.core-1.12.0-py2.py3-none-any.whl
(51kB)
    100% |¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦| 61kB 1.0MB/s
Requirement already satisfied, skipping upgrade: spidev; platform_system ==
"Linux" in /usr/local/lib/python3.7/dist-packages (from
luma.core>=1.12.0->luma.oled) (3.4)
 
Installing collected packages: luma.core, luma.oled
Successfully installed luma.core-1.12.0 luma.oled-3.3.0
pi@rpi3bplus-1:~$ python3
Python 3.7.3 (default, Apr  3 2019, 05:39:12)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from luma.core.interface.serial import i2c, spi
>>> from luma.core.render import canvas
>>> from luma.oled.device import ssd1327
>>>

 Looks to me like the display is feasible (the usage page didn't list
the 1327, but imported 1306, 1309, 1325, 13331, and sh1106 -- I took a
chance specifying 1327, and it took without error) {I've now uninstalled
since, as stated, I don't have the display, so why clutter SD card}

 Obviously, you'll need to follow the luma.oled API to use the display.




--
 Wulfraed                 Dennis Lee Bieber         AF6VN
 wlfraed@ix.netcom.com    http://wlfraed.microdiversity.freeddns.org/

--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.