2

I'm trying to work with the Tronpy module in Micropython. It works fine when I'm using CPython. However, in Micropython, I tried to install it and got an error message. I'm using Fedora 34.

$ micropython -m upip install tronpy
Installing to: /home/user/.micropython/lib/
Warning: micropython.org SSL certificate is not validated
Error installing 'tronpy': , packages may be partially installed

I'm new to Micropython and this error message isn't helpfull at all. How can I track the nature of this error and solve it?

Thank you very much in advance.

gscofano
  • 83
  • 10

1 Answers1

4

It appears that you are attempting to upip install a CPython module on MicroPython. (sorry , could have seen that sooner)

That will not work - unless that module is packaged specifically for MicroPython.

The error message could be clearer though...

I would suggest searching PyPi for MicroPython specific packages, either through the micropython- prefix or using the programming language filter: screenshot

lastly: in upip you can enable some debug messages by setting upip.debug = True as in the below sample

MicroPython v1.16-dirty on 2021-06-19; linux version
Use Ctrl-D to exit, Ctrl-E for paste mode
>>> import upip
>>> upip.debug = True
>>> upip.install('micropython-pystone')
Installing to: /home/jos/.micropython/lib/
Queue: ['micropython-pystone']
https://micropython.org/pi/micropython-pystone/json
Warning: micropython.org SSL certificate is not validated
Installing micropython-pystone 3.4.2.post2 from https://micropython.org/pi/pystone/pystone-3.4.2.post2.tar.gz
https://micropython.org/pi/pystone/pystone-3.4.2.post2.tar.gz
Skipping micropython_pystone.egg-info/PKG-INFO
Extracting /home/jos/.micropython/lib/pystone.py
{}
>>> import pystone
>>> pystone.pystones()
(0.388, 128865.9793814433)
Jos Verlinde
  • 1,468
  • 12
  • 25
  • I was using version 1.13, which I downloaded from Fedora repositories. Nevertheless, I downloaded Micropython source in Github, built mpy-cross and the unix port and tried the new version I just built. I got the exact same error. As confirmation, I did see the header indicating the version 1.18-5 when I opened the shell: MicroPython v1.18-5-g037b2c72a-dirty on 2022-02-02; linux version. – gscofano Feb 02 '22 at 14:38