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

On 18/12/2019 19:19, Dennis Lee Bieber wrote:
> On Wed, 18 Dec 2019 13:54:24 +0000, RobH  declaimed the
> following:
>
>> On 18/12/2019 12:01, RobH wrote:
>>> I managed to install the micropython-ssd1327-1.0.0 library,according to
>>> this:
>>>    https://www.raspberrypi.org/forums/viewtopic.php?t=191744
>>> but after adding: import ssd1327
>>> it returns
>
>  But did you also install /micropython/ itself?

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
>
>>>
>>> File "build/bdist.linux-armv6l/egg/ssd1327.py", line 5, in 
>>> ImportError: No module named micropython
>>>
>>> Have I missed something.
> 50
>>
>> Oops, a bit vague above.
>> I am trying to install the ssd1327 driver for a oled display.
>> Adafruit's library file won't install because
>>
>> This library is not available on PyPI yet. Install documentation is
>> included as a standard element. Stay tuned for PyPI availability!
>>
>> So then I found the same driver file for micropython, but I get the
>> above error when I import the said ssd1327 in a python script.
>
>
> ... and if you did, are you invoking it? Micropython is not a module for
> regular Python, it is a separate limited language interpreter optimized for
> use on microcontrollers.

No I did not invoke as I didn't know that it had to be
>
>  A search for "ssd1327 raspberry pi" leads to
> https://luma-oled.readthedocs.io/en/latest/intro.html
>
>
> FYI: from what I can tell, if the Adafruit library
> https://github.com/adafruit/Adafruit_CircuitPython_SSD1327/releases/tag/1.0.0
> can be used, you'll have to install the Adafruit blinka library to provide
> the CircuitPython interface API.
>
>  As for the lack of PyPi availability...
>
>
> pi@rpi3bplus-1:~$ mkdir scratch
> pi@rpi3bplus-1:~$ cd scratch
> pi@rpi3bplus-1:~/scratch$ git init
> Initialized empty Git repository in /home/pi/scratch/.git/
> pi@rpi3bplus-1:~/scratch$ git clone
> https://github.com/adafruit/Adafruit_CircuitPython_SSD1327
> Cloning into 'Adafruit_CircuitPython_SSD1327'...
> remote: Enumerating objects: 36, done.
> remote: Counting objects: 100% (36/36), done.
> remote: Compressing objects: 100% (26/26), done.
> remote: Total 36 (delta 10), reused 30 (delta 8), pack-reused 0
> Unpacking objects: 100% (36/36), done.
> pi@rpi3bplus-1:~/scratch$ ls
> Adafruit_CircuitPython_SSD1327
> pi@rpi3bplus-1:~/scratch$ cd Adafruit_CircuitPython_SSD1327/
> pi@rpi3bplus-1:~/scratch/Adafruit_CircuitPython_SSD1327$ ls
> adafruit_ssd1327.py  docs      LICENSE     requirements.txt
> CODE_OF_CONDUCT.md   examples  README.rst  setup.py
> pi@rpi3bplus-1:~/scratch/Adafruit_CircuitPython_SSD1327$ sudo python3
> setup.py install
> running install
> running bdist_egg
> running egg_info
> creating adafruit_circuitpython_ssd1327.egg-info
> writing adafruit_circuitpython_ssd1327.egg-info/PKG-INFO
>  
>
>  Unfortunately, that relies upon /displayio/, which itself does not seem
> be available for Linux systems. It is part of
> pi@rpi3bplus-1:~/scratch$ git clone
> https://github.com/adafruit/circuitpython
> Cloning into 'circuitpython'...
>
> ... but setup.py fails on that download
>
> pi@rpi3bplus-1:~/scratch/circuitpython$ sudo pip3 install
> circuitpython-stubs
> Looking in indexes: https://pypi.org/simple,
> https://www.piwheels.org/simple
> Collecting circuitpython-stubs
>    Downloading
>
https://www.piwheels.org/simple/circuitpython-stubs/circuitpython_stubs-2019.7.
7-py3-none-any.whl
> Installing collected packages: circuitpython-stubs
> Successfully installed circuitpython-stubs-2019.7.7
> pi@rpi3bplus-1:~/scratch/circuitpython$ sudo python3 setup.py install
> running install
> running bdist_egg
> running egg_info
> writing circuitpython_stubs.egg-info/PKG-INFO
> writing dependency_links to
> circuitpython_stubs.egg-info/dependency_links.txt
> writing top-level names to circuitpython_stubs.egg-info/top_level.txt
> error: package directory 'circuitpython-stubs' does not exist
> pi@rpi3bplus-1:~/scratch/circuitpython$
>
>

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???

It now seems that the said oled display can't be used with a raspberry
pi, as it needs the ssd1327 library.

Thanks

--- 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™.