Cannot run code to CyberPi in Live Mode with the Python Editor


#1

Hi,

I am unable to run very basic code with the Python Editor (web or desktop version) in Live Mode (see sreenshot). The same code runs on the CyberPi if I upload it.

Does anyone have any insights?

Thanks!
˜FMD


AttributeError: module 'cyberpi' has no attribute 'console'
#2

Hi there:

Please click the link below to solve this problem if you still can’t fix it feel free to contact with us

FYI:https://www.yuque.com/makeblock-help-center-zh/mcode/qx8ypg?translate=en


#3

Hi, indeed the pip install pyserial will work, but there are other problems with the MacOS (Monterey) install. It seems that the python version is very old.

For instance event library is for python 2.7 and fails installation:

How should we fix this? Is there a way to force mblock to use the local python3 installation (and keep that up to date using brew)? That way I think all errors for MacOS are fixed.


#4

Hello, @fmd.

Your problem may also be that you need to install the cyberpi library manually by following these steps:

  1. Click the Libraries tab.

  2. Click the install button for the library cyberpi.

  3. Wait for the library to finish installing. Now it’s installed, and you can begin coding!

I hope that helps! If you could use more help, just reply and mention me as @Best_codes!

Thanks, for your time,
Best_codes