To work in Python, I was only able to get it to run by clicking on the palette options in the notebook cell and selecting the option to execute the selected text.

Rafael Sousa