Page 1 of 1

Unable to install modules on Pico using Thonny

Posted: Sun Jul 03, 2022 10:24 am
by Thomas_G_S
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

Re: Unable to install modules on Pico using Thonny

Posted: Wed Jul 06, 2022 5:07 am
by aivarannamaa
Please try the newest Thonny version: https://github.com/thonny/thonny/releases/tag/v4.0.0b3

Re: Unable to install modules on Pico using Thonny

Posted: Wed Jul 06, 2022 3:57 pm
by scruss
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.