[Microbit-Python] Can't get MU to run on MACbookAir

Nicholas H.Tollervey ntoll at ntoll.org
Wed Aug 3 07:12:36 EDT 2016


Hi Bob,

From the screenshots, it appears that Mu is working fine on your
Macbook. I'm trying to work out what it is that *isn't* working for you.

Please bear with me if any of the following is obvious ~ I just want to
make sure you've set yourself up properly.

1) Mu is working.
2) Plug in a micro:bit device to your Macbook via USB.
3) Click on the flash button and your script (in the Mu editor) will be
transferred (flashed) onto the micro:bit (should take around 6 seconds).
If there are any errors they'll scroll across the micro:bit's display.
4) Click on the REPL button to get access to the interactive prompt for
the version of Python running on the micro:bit.

You don't need to install Python 3.6 onto your Macbook - you should be
using the version of Python *on* the actual device itself. For this to
work you flash the device with the MicroPython runtime as I described in
step 3 above. Following that, you get access to the Python prompt by
clicking the REPL button.

Does this make sense?

Best of luck,

N.

On 02/08/16 16:35, Robert Humphrey wrote:
> Thanks for the response.  I find it hard work trying to install Micro
> Python, and thanks for bearing with me.  The attached screen shot is
> typical. It appears that there in’t a library to import.
> 
> I followed your link via Pep-8, installed Python 3.6,  installed Active
> tcl 8.6. Ran Python 3.6 and get errors.   I re-tried MU and again it
> appears that there are no libraries to import. Is there a simple way to
> get all this working as I can get Python to work interactively from the
> net at W3. microbit.Pythonanywhere.com
> <http://microbit.pythonanywhere.com>,  but no luck locally.
> Bob
> 
> 
> 
>> ote:
>>
>> On 02/08/16 13:37, Robert Humphrey wrote:
>>> I have installed MU from GitHub latest  MU-3  30/07/2016  but it
>>> errors out on every statement.  What haven’t I loaded?
>>>
>>> Op Sys  OSX  El Capitaine
>>>
>>> Example code:-
>>>
>>>
>>>
>>> _______________________________________________
>>> Microbit mailing list
>>> Microbit at python.org <mailto:Microbit at python.org>
>>> https://mail.python.org/mailman/listinfo/microbit
>>>
>>
>> Hi Robert,
>>
>> Thanks for the feedback.
>>
>> In future, please just attach the PNG image file rather than sticking
>> the screen shot in a PDF - it's just simpler and I don't have to twist
>> my neck to see what you're up to (I sprained it trampolining over the
>> weekend). :-)
>>
>> So, I'm trying to work out what exactly you mean. Do you mean that Mu
>> has an error in it and crashes OR that Mu is reporting errors for every
>> line in your code? Looking at your screenshot, I believe you're
>> reporting the latter.
>>
>> If so, these are not errors!
>>
>> Rather, they are code quality feedback annotations. Your code probably
>> will still work, but it has stylistic problems. For example, I can see
>> from lines 5-8 you use a comment "#" without following it with a space
>> (to aid readability). If you click on the red arrow next to each line a
>> little post-it note will appear to explain why the line has been flagged.
>>
>> Such code quality checking is advisory! Unless you get syntax errors
>> your code will run (although it may still contain bugs because it
>> doesn't work as you expect).
>>
>> If you're interested in the conventions Mu uses for checking the quality
>> of your code you should read up on PEP-8 - the style guide for Python
>> programming (it's like the style guide newspapers use to guide their
>> journalists in writing in an idiomatic and "house" style).
>>
>> https://www.python.org/dev/peps/pep-0008/
>>
>> PEP-8 was written by Python's creator Guido van Rossum and a couple of
>> other collaborators (including Nick Coghlan, who may be subscribed to
>> this list). It's their vision of well written, idiomatic Python. Many
>> Python programmers, myself included, use it for guidance when writing
>> code.
>>
>> You are free to ignore it though. As PEP-8 itself says, "a foolish
>> consistency is the hobgoblin of little minds".
>>
>> :-)
>>
>> Hope this helps, and more than happy to answer any questions you may have.
>>
>> N.
>>
>> _______________________________________________
>> Microbit mailing list
>> Microbit at python.org
>> https://mail.python.org/mailman/listinfo/microbit
> 
> 
> 
> _______________________________________________
> Microbit mailing list
> Microbit at python.org
> https://mail.python.org/mailman/listinfo/microbit
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/microbit/attachments/20160803/e7ef6481/attachment.sig>


More information about the Microbit mailing list