Installing Mu on Linux

Questions and discussion about running MicroPython on a micro:bit board.
Target audience: MicroPython users with a micro:bit.
Post Reply
rhubarbdog
Posts: 168
Joined: Tue Nov 07, 2017 11:45 pm

Installing Mu on Linux

Post by rhubarbdog » Sat Nov 11, 2017 9:53 am

Has anyone got a sucess story?
I downloaded the zip from github and un zipped it.
I then typed

Code: Select all

pip3 install -r requirements.txt
this nearly worked first time, but i had to use

Code: Select all

sudo apt-get install ...
and re-ran pip3 install ... I now have a partially working Mu ide.

Issue 1: file only works if i'm root. If i'm a normal user the following error box pops up. Could not find an attatched micro:bit
Issue 2: repl only works if i'm root, if i'm a normal user the following error box pops up. Cannot connect to device on port /dev/ttyACM0
Issue 3: even as root file and repl may crash Mu
Issue 4: lots of error diagnostics are printed to stdout

When i'm up and running i'll publish a guide for micro:bit and mint/ubuntu/debian linux

User avatar
deshipu
Posts: 1388
Joined: Thu May 28, 2015 5:54 pm

Re: Installing Mu on Linux

Post by deshipu » Sat Nov 11, 2017 3:18 pm

Did you follow the instructions at https://codewith.mu/?

rhubarbdog
Posts: 168
Joined: Tue Nov 07, 2017 11:45 pm

Re: Installing Mu on Linux

Post by rhubarbdog » Sat Nov 11, 2017 7:14 pm

I'm always reluctant to install anything that can't be achieved by

Code: Select all

sudo apt-get install ...
I've just tried clicking download for linux and followed instructions to make it executble.
added myself to group dialout logged out and back in for that to take effect.
Running mu as a normal user yielded the following then hung

Code: Select all

Logging to /home/phil/.cache/mu/log/mu.log
Running mu as root yeilded the following then hung

Code: Select all

Logging to /home/phil/.cache/mu/log/mu.log
libGL error: unable to load driver: r600_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: r600
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast

rhubarbdog
Posts: 168
Joined: Tue Nov 07, 2017 11:45 pm

Re: Installing Mu on Linux

Post by rhubarbdog » Sat Nov 11, 2017 7:18 pm

Now I'm a member of group dialout I can use the file option without being root, 1 partial success

still getting the following output

Code: Select all

Logging to /home/phil/.cache/mu/log/mu.log
QApplication: invalid style override passed, ignoring it.
Flashing Python to: /media/phil/MICROBIT/micropython.hex
QXcbConnection: XCB error: 3 (BadWindow), sequence: 4101, resource id: 12689831, major code: 40 (TranslateCoords), minor code: 0
being a member of dialout has allowed me to open the REPL, but my micro:bit isn't executing what i type in

rhubarbdog
Posts: 168
Joined: Tue Nov 07, 2017 11:45 pm

Re: Installing Mu on Linux

Post by rhubarbdog » Sat Nov 11, 2017 7:24 pm

REPL working you have to crash into running code, i was trying after i had pressed button_a to break from the while True:

rhubarbdog
Posts: 168
Joined: Tue Nov 07, 2017 11:45 pm

Re: Installing Mu on Linux

Post by rhubarbdog » Sat Nov 11, 2017 9:14 pm

Instructions that work with linux mint, ubuntu and other debian systems can be found here https://ubuntuforums.org/showthread.php ... st13710070

Post Reply