← index #5666Issue #373
Off-topic · high · value 0.268
QUERY · ISSUE

Document existence of brew installable micropython for Mac

openby george-hawkinsopened 2020-02-19updated 2024-09-29
docsport-unix

I've just started using MicroPython with a ESP32 board - it's absolutely super! Now I want to work in a MicroPython environment without having to connect to the board. It turns out all I have to do to install such an environment on my Mac is:

$ brew install micropython
$ micropython
MicroPython v1.12 on 2020-01-11; darwin version
Use Ctrl-D to exit, Ctrl-E for paste mode
>>> 

However, I only came across this by chance. If I look at the "Unix version" section of the main README or the Mac section of the "Getting Started" wiki page then I just see fairly involved instructions for building from sources.

I tried brew install micropython on the off chance that it existed after seeing that packages have been built for other platforms, e.g. Fedora.

The micropython formula is up-to-date, i.e. currently provides MicroPythin 1.12, and seems to have been actively maintained since April 2016 when the original formula for 1.7 was added.

Micropython is amazing and anything that makes it easier to use on any platform is of great value. I know Micropython is a huge effort undertaken by a limited number of people, so my apologies for submitting this as an issue, rather than a pull request.

CANDIDATE · ISSUE

ES8266 upip cannot install packages from PyPi

closedby rvalleopened 2020-03-12updated 2023-08-21

Hi!

I am new to micropython, I am testing to install packages from PyPI directly on target. The idea is to use upip as the tool to download and install our software on the target.

on the Unix port I can install for example the package micropython-scron

$ docker run -it mitchins/micropython-linux
MicroPython v1.12-248-g86bfabec1 on 2020-03-11; linux version
Use Ctrl-D to exit, Ctrl-E for paste mode
>>> import upip
>>> upip.install("micropython-scron")
Installing to: /root/.micropython/lib/
Warning: micropython.org SSL certificate is not validated
Installing micropython-scron 0.8.0 from https://files.pythonhosted.org/packages/19/e8/a0389d7e156245f45f4a0d0705b6529bbace88d5b691369fac7326768c69/micropython-scron-0.8.0.tar.gz

However when I try to do the same on target:

WebREPL daemon started on ws://0.0.0.0:8266
Started webrepl in normal mode
Hello World from Celpax

MicroPython v1.12 on 2019-12-20; ESP module with ESP8266
Type "help()" for more information.
>>> 
>>> import upip
>>> upip.install("micropython-scron")
Installing to: /lib/
Warning: micropython.org SSL certificate is not validated
Error installing 'micropython-scron': , packages may be partially installed

upip seems, on target, to be hardcoded to only fetch micropython-lib packages, which I find hard to believe, and also checking past upip issues I can see downloads from pypi.org on target.

So, what is it that I am getting wrong?

1 comment
andrewleech · 2023-08-21

Sorry you didn't get feedback at the time, but now Micropython has recently rolled out a new packaging tool called mip, for details see https://docs.micropython.org/en/latest/reference/packages.html

This supports installation of packages from custom sources.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied