Syntax Error afni_proc.py

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

awdpt800wg3:~ salzwedelap$ afni_proc.py
File “/Users/salzwedelap/abin/afni_proc.py”, 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 afni_proc.py with specific inputs a la my old scripts.

Thank you for your help

Andy

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
/opt/local/bin/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…
Andy

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

Best,
Andy

Thanks, Andy.