Syntax Error

Following some updates to my computer that were out of my control I get the following error when trying to run

awdpt800wg3:~ salzwedelap$
File “/Users/salzwedelap/abin/”, line 754
print ‘%sSubjProcSream: %s’ % (mesg, self.label)
SyntaxError: invalid syntax

Normally, running this command would give you the help documentation, but as you can see it errors out. The same happens when I try to use with specific inputs a la my old scripts.

Thank you for your help


Hi Andy,

I expect that you are using python 3 instead of 2.

What do these commands show?

which python
python --version
afni -ver

  • rick

Thank you for the quick inquiry Rick, you are the best.

Here are outputs you requested:

awdpt800wg3:~ salzwedelap$ which python
awdpt800wg3:~ salzwedelap$ python --version
Python 3.4.5
awdpt800wg3:~ salzwedelap$ afni -ver
Precompiled binary macosx_10.7_Intel_64: Feb 25 2016 (Version AFNI_16.0.10)

Indeed, it looks like I’m using Python 3.X…

Replying to my own comment here, but for those using MacOS and MacPorts, you can switch the default python to 2.7 (assuming you have it installed) using:

sudo port select --set python python27


Thanks, Andy.