Arm Mbed OS support forum

Invalid syntax error python

I am using Mbed Studio Version 1.1.0 in windows. I am trying to build the following program.
Mbed os example wakaama

I get the following error

mbed-os-example-wakaama/mbed-os/tools/", line 185
print mcu_toolchain_matrix(platform_filter=options.general_filter_regex)
SyntaxError: invalid syntax

I think this is caused by python version
I have installed python 2.7 in my machine but still inside the mbed studio cli python version is 3.7.1.
What is the solution for this.

Hi Hasitha,

Mbed Studio is distributed with its own version of Python (3.7.1 in release 1.1). It doesn’t use Python installed on your system. Issue exists because the program you are using is using old version of Mbed OS (version 5.4.4). Python tools in that version of Mbed OS are not working correctly with Python 3.
Mbed Studio supports only Mbed OS version 5.12.0 or higher. I recommend if possible updating the Mbed OS version in your program.

Arek - Studio team

Hi Arek,
Do I have to do it manually? Is there a guide or a tool for this.