Unable to install modules on Pico using Thonny

RP2040 based microcontroller boards running MicroPython.
Target audience: MicroPython users with an RP2040 boards.
This does not include conventional Linux-based Raspberry Pi boards.
Post Reply
Thomas_G_S
Posts: 18
Joined: Mon Jan 03, 2022 1:29 pm

Unable to install modules on Pico using Thonny

Post by Thomas_G_S » Sun Jul 03, 2022 10:24 am

Hello,
I have just purchased the new Raspberry Pi Pico W and I'm trying to install the 'secrets' module on it using Thonny. Unfortunately, whenever I try to install it I get the following error message: "minipip returned with error code 1".

I've had this problem before trying to install modules, but I have previously solved it by using Mac instead of Windows. Any suggestions on how I can get it working on my computer?
Thanks,
Thomas

User avatar
aivarannamaa
Posts: 171
Joined: Fri Sep 22, 2017 3:19 pm
Location: Estonia
Contact:

Re: Unable to install modules on Pico using Thonny

Post by aivarannamaa » Wed Jul 06, 2022 5:07 am

Please try the newest Thonny version: https://github.com/thonny/thonny/releases/tag/v4.0.0b3
Aivar Annamaa
https://thonny.org

User avatar
scruss
Posts: 360
Joined: Sat Aug 12, 2017 2:27 pm
Location: Toronto, Canada
Contact:

Re: Unable to install modules on Pico using Thonny

Post by scruss » Wed Jul 06, 2022 3:57 pm

Thomas_G_S wrote:
Sun Jul 03, 2022 10:24 am
I'm trying to install the 'secrets' module on it
Most of the pypi libraries matching "secrets" would have difficulty running under MicroPython.

The CircuitPython convention of storing stuff you don't want to share accidentally in secrets.py, which looks like this:

Code: Select all

# SPDX-FileCopyrightText: 2019 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT

# This file is where you keep secret settings, passwords, and tokens!
# If you put them in the code you risk committing that info or sharing it

secrets = {
    "ssid": "yourssid",
    "password": "yourpassword",
    "timezone": "America/New_York",  # Check http://worldtimeapi.org/timezones
    "aio_username": "youraiousername",
    "aio_key": "youraiokey",
}
So you can access one of these fields with secrets.secrets['ssid'], for example.

Post Reply