I had the same problem. This worked for me on mac:
echo “set enable-bracketed-paste off” >> ~/.inputrc
In the shell, you can’t execute more than one statement at a time:
>>> x = 5
y = 6
SyntaxError: multiple statements found while compiling a single statement
You need to execute them one by one:
>>> x = 5
>>> y = 6
>>>
syntaxerror: multiple statements found while compiling a single statement
When you see multiple statements are being declared, that means you’re seeing a script, which will be executed later. But in the interactive interpreter, you can’t do more than one statement at a time.