[Solved] upip library installation problem

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
paul953
Posts: 2
Joined: Wed Apr 08, 2020 6:12 pm

[Solved] upip library installation problem

Post by paul953 » Wed Apr 08, 2020 7:33 pm

Hi,

I am having a problem installing micropython libraries on my ESP32 with Thonny. I have tried installing schedule, logging, and scron and get the same error. I have tried using Thonny on a Raspberry Pi 3 and on a Windows PC and get the same error.

I am using upip on the Thonny REPL

Code: Select all

MicroPython v1.12-337-g312c69949 on 2020-04-05; ESP32 module with ESP32

Type "help()" for more information.
>>> import upip
>>> upip.install("micropython-schedule")
Installing to: /lib/
Error installing 'micropython-schedule': list index out of range, packages may be partially installed
>>>
Can anyone tell me what I am doing wrong please? It is very odd that I am getting the error on the Pi and the PC and with different packages. There was a short boot.py on the ESP 32 which just logs onto the wifi LAN and a blank main.py. The board is a DOIT (or clone) with 2Mb on board (accordoing to Thonny but I thought it was meant to be 4Mb) so there should be plenty of space for the libraries.

Code: Select all

>>> <thonny>{'/': {'boot.py': {'size': 370, 'kind': 'file', 'time': 946684800}, 'main.py': {'size': 0, 'kind': 'file', 'time': 946684800}}}</thonny>>
I have since erased the flash memory and reloaded micropython but the error persists.
Last edited by paul953 on Fri Apr 10, 2020 7:55 am, edited 1 time in total.

paul953
Posts: 2
Joined: Wed Apr 08, 2020 6:12 pm

Re: upip library installation problem

Post by paul953 » Fri Apr 10, 2020 6:39 am

Solved this problem.

Turns out the DNS server IP I set in network.WLAN.ifconfig() was wrong. The ESP32 was connecting to the WifiLAN (WLAN.isconnected()=True) but not reaching external websites so couldn't download the libraries.

Now I have a different problem with failed handshakes but will investigate before posting separately.

Post Reply