Can't load ssd1306 package in Thony

I’m trying to load the ssd1306 package in Thony on my pico, using the package manager and keep getting this error message.

‘–disable-pip-version-check’, ‘–trusted-host’, ‘127.0.0.1’, ‘install’, ‘–no-compile’, ‘–use-pep517’, ‘–upgrade-strategy’, ‘only-if-needed’, ‘ssd1306’, ‘–index-url’, ‘http://127.0.0.1:36628’]’ returned non-zero exit status 2.

I’m following the instructions from the official Get Started With Micropython book from Raspberry Pi.

Does anyone have any suggestions?

What version of Thonny are you on? I know there were some issues installing packages with some previous versions.

Thank you for responding,

It says version 4.1.7. I ran “sudo apt update && sudo apt upgrade -y” in a terminal just to be sure that I was reading it correctly and I still get the same error message when I try to install the package. I’ve tried to install it on a Pico and a Pico 2W. I’m working through the projects in the book “Get Started with MicroPython on Raspberry Pi Pico” by Raspberry Pi. In one project it had me create a program called “connect” for connecting to my wifi and use the “import” function in a later project. Is this a possible method (for an absolute beginner) to use as a work around for installing the package?

Hmm, that package seems to install correctly for me with ‘Manage Packages’ in Thonny 4.1.7.

Have you checked that you have ‘MicroPython (Raspberry Pi Pico)’ selected as your interpreter at the bottom right of Thonny? You could also check that there’s sufficient free storage space on your device - there’s an option to do that under the dropdown menu in the ‘Files’ window.

If that doesn’t help perhaps you could post a photo or screenshot of the full error?

As best that I can tell it looks like I have plenty of space and I’m using the correct interpreter. Maybe these screenshots will provide some insight?

Hmm, and you’re installing the package through Thonny’s ‘Manage Packages…’ (in the Tools menu), is that correct?

Yes, I’ve been trying to install the package through Thonny’s Manage Packages in the tools menu. I’ll attach some screenshots to see if that helps.

Success! I found a way to load it into my pico’s lib folder from github while in a terminal with this link. GitHub - PerfecXX/MicroPython-SSD1306: MicroPython Library for SSD1306 OLED Displays with some simple shape drawing functions.

Thank you for all of your help!

Good stuff, glad you found a workaround!

Looks like there may be an issue installing packages via Thonny in the most recent version of Raspberry Pi OS: Can't manage packages! · Issue #3750 · thonny/thonny · GitHub