pybricks / support

Pybricks support and general discussion
MIT License
109 stars 7 forks source link

[Feature] add `pybricks-micropython` binary to the release assets #1034

Open kai-morich opened 1 year ago

kai-morich commented 1 year ago

I succesfully installed different pybricks-micropython on EV3 with the help of https://github.com/pybricks/support/issues/648.

Finding the file for the master branch works as described in #648, but getting that file for release versions is a bit tricky, e.g. works for recent v3.2.3 but not for older releases like v3.1.0 because Github keeps build artifacts only for 90 days.

Would be nice if you could add the pybricks-micropython binary to the release assets.

dlech commented 1 year ago

To make easier to install, I've published a new debian package for the latest beta release (v3.3.0b5).

To get it, run the following on an EV3 that is connected to the Internet:

sudo apt update
sudo apt install pybricks-micropython3

If you want to use this version in your programs, change the shebang to #!/usr/bin/env pybricks-micropython3 (the only difference is the 3 at the end).

Note: there will be errors reported in apt update due to debian stretch being out of support but they can be ignored. If it really bothers you and you want to fix it or need other packages, you can fix it as follows:

wget https://raw.githubusercontent.com/ev3dev/docker-library/master/ev3dev-stretch/layers/debian/etc/apt/sources.list
sudo mv sources.list /etc/apt/
sudo apt update
kai-morich commented 1 year ago

That solution is really cool. All can be done now in VS Code. No more downloading, copy to ev3, forgetting x flag, ... I don't mind the warning from apt update. Biggest effort was configuring internet access by precisely following these steps: https://www.ev3dev.org/docs/tutorials/connecting-to-the-internet-via-usb/

Would be good if you document this somewhere, e.g. link here as different variants for EV3. BTW the link there to latest ev3dev image is broken. I simply used the version from LEGO and above sudo apt install ...