ImportError: no module named 'adafruit_display_text'

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Dorky
 
Posts: 5
Joined: Wed Jan 18, 2023 7:17 pm

ImportError: no module named 'adafruit_display_text'

Post by Dorky »

Hello, I tried to get a display SSD1306 or SH1106 to work on an RP2040 using CircuitPython 8.

I always get this:

>>> from adafruit_display_text import label
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'adafruit_display_text'
>>>

I tried to set it up with ...-raspberry_pi_pico-en_US-8.0.0-beta.6.uf2 and ...-raspberry_pi_pico-en_US-7.3.3.uf2.
Now I even do not have any hardware connected. From my knowledge after putting the four files of the adafruit_display_text library in the lib folder (either .mpy or .py) on the Pico I restarted the controller and tried
"from adafruit_display_text import label"
on the REPL of thonny. I always got the same error.

I did a search on this and got some hints on taking the right library and safely ejecting the Pico but nothing worked for me.

This should be one of the most commonly used libraries.

Any suggestions on what I might have done wrong?

User avatar
dastels
 
Posts: 15674
Joined: Tue Oct 20, 2015 3:22 pm

Re: ImportError: no module named 'adafruit_display_text'

Post by dastels »

You need to put the adafruit_display_text folder into CIRCUITPY/lib, not the files it contains.

Dave

User avatar
Dorky
 
Posts: 5
Joined: Wed Jan 18, 2023 7:17 pm

Re: ImportError: no module named 'adafruit_display_text'

Post by Dorky »

Thanks a lot.

With all that good documentation and adafruit learning and so on I must be stupid to not having noticed that.
I guess I was not the first one though.

Dirk

User avatar
blakebr
 
Posts: 959
Joined: Tue Apr 17, 2012 6:23 pm

Re: ImportError: no module named 'adafruit_display_text'

Post by blakebr »

D,

No need to apologize unless you are the reason Comet cleanser has the warning do not eat.

Bruce

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”