Re: [Freesurfer] Help: Aparcstats and asegstats not working

2023-01-02 Thread vittal korann
External Email - Use Caution

Thanks, Yujing!

Happy new year!

I’m wondering what the first line is in your /usr/local/freesurfer/bin/
asegstats2table
/usr/bin/env python

python asegstats2table –subjects … --tablefile …
python /usr/local/freesurfer/bin/asegstats2table –subjects … --tablefile …
- this worked for me.

Your suggestion worked for me, thanks!

With regards
Vittal



On Mon, Jan 2, 2023 at 3:51 PM Huang, Yujing 
wrote:

> Hi Vittal,
>
>
>
> Happy new year!
>
>
>
> I’m wondering what the first line is in your
> /usr/local/freesurfer/bin/asegstats2table. Can you check it by doing ‘head
> /usr/local/freesurfer/bin/asegstats2table’ at the prompt?
>
>
>
> Can you also try the following?
>
> 1. alias python=python2  (as suggested in previous email)
>
> 2. python asegstats2table –subjects … --tablefile …
>
>
>
> Best,
>
>
>
> Yujing
>
>
>
>
>
>
>
> *From:* vittal korann 
> *Sent:* Friday, December 30, 2022 3:56 PM
> *To:* Huang, Yujing 
> *Cc:* Freesurfer support list 
> *Subject:* Re: [Freesurfer] Help: Aparcstats and asegstats not working
>
>
>
> *External Email - Use Caution*
>
> Thanks, Yujing, for your quick response.
>
>
>
> I tried your suggestion as well but the same error keeps appearing.
>
>
>
> $ asegstats2table --subjects Met001_1 Met002_1 Met003_1 Met005_1 Met006_1
> Met007_1 Met008_1 Met009_1 Met012_1 Met013_1 Met015_1 Met016_1 Met017_1
> Met018_1 Met019_1 Met020_1 Met021_1 Met022_1 Met023_1 Met024_1 Met025_1
> Met026_1 Met029_1 Met030_1 Met031_1 Met033_1 Met034_1 TOPIRA004_1
> TOPIRA005_1 TOPIRA012_1 TOPIRA013_1 TOPIRA019_1 TOPIRA021_1 TOPIRA022_1
> TOPIRA024_1 TOPIRA025_1 TOPIRA026_1 TOPIRA027_1 TOPIRA029_1 TOPIRA030_1
> TOPIRA032_1 Tao101_1 Tao103_1 Tao104_1 Tao105_1 Tao106_1 Tao107_1 Tao108_1
> Tao111_1 Tao112_1 Tao113_1 Tao115_1 Tao117_1 Tao118_1 Tao120_1 Tao121_1
> Tao124_1 Tao126_1 Tao127_1 C001_1 C002_1 C003_1 C004_1 C005_1 C006_1 C007_1
> C008_1 C009_1 C010_1 C011_1 C012_1 C013_1 C014_1 C015_1 C016_1 C017_1
> C018_1 C019_1 C020_1 C021_1 C023_1 C024_1 --hemi lh --meas. area
> --tablefile Area_aseg_stats txt
>
>
>
> File "/usr/local/freesurfer/bin/asegstats2table", line 195
> print 'ERROR: subjects are not specified (use --subjects SUBJECTS)'
>   ^
> SyntaxError: invalid syntax
>
>
>
> I do not know where I am going wrong with this.
>
> Any suggestion would be appreciated.
>
>
>
> Thanks,
>
> Vittal
>
>
>
>
>
>
>
> On Fri, Dec 30, 2022 at 12:33 PM Huang, Yujing 
> wrote:
>
> Hi Vittal,
>
>
>
> I can only repro your error by running ‘python asegstats2table …’.  And
> the alias solution works for me.
>
>
>
> Running ‘asegstats2table’ directly doesn’t give me any errors, and it
> doesn’t need the alias setting.
>
>
>
> Best,
>
>
>
> Yujing
>
>
>
> *From:* freesurfer-boun...@nmr.mgh.harvard.edu <
> freesurfer-boun...@nmr.mgh.harvard.edu> *On Behalf Of *fsbuild
> *Sent:* Friday, December 30, 2022 12:29 AM
> *To:* freesurfer@nmr.mgh.harvard.edu
> *Cc:* vittalkor...@gmail.com
> *Subject:* Re: [Freesurfer] Help: Aparcstats and asegstats not working
>
>
>
> *External Email - Use Caution*
>
>
> SyntaxError: Missing parentheses in call to 'print'. Did you mean
> print('ERROR: atleast 1 subject must be provided')?
>
> It does not look like you are running a python 2.X.  That may be because
> only python3 is installed by default.
>
>
>
> $ which python
> $ which python2
> $ which python3
> /bin/python3
>
>
>
> … if you need to install python2, you can do it with ...
>
>
>
> $ sudo apt update
>
> $ sudo apt install python2
>
>
>
> $ which python2
>
> /bin/python2
>
> $ python2 --version
> Python 2.7.18
>
>
>
> One way or another you need “python” to report it is a 2.X version *after*
> you set FREESURFER_HOME and source the freesurfer setup script.  To force
> “python” to run as “python2” you can try using an alias,
>
>
>
> $ alias python=python2
>
> $ python --version
> Python 2.7.18
>
> Similarly, if you needed python to run as python3 you could reset the
> alias to use =python3 instead.
>
>
>
> For the error,
>
>  print 'ERROR: subjects are not specified (use --subjects SUBJECTS)’
>
> I would check the subjects you are listing as argument can be found as
> directories under what SUBJECTS_DIR is currently set to.
>
>
>
> - R.
>
>
>
> The information in this e-mail is intended only for the person to whom it
> is addressed.  If you believe this e-

Re: [Freesurfer] Help: Aparcstats and asegstats not working

2023-01-02 Thread Huang, Yujing
Hi Vittal,

Happy new year!

I’m wondering what the first line is in your 
/usr/local/freesurfer/bin/asegstats2table. Can you check it by doing ‘head 
/usr/local/freesurfer/bin/asegstats2table’ at the prompt?

Can you also try the following?
1. alias python=python2  (as suggested in previous email)
2. python asegstats2table –subjects … --tablefile …

Best,

Yujing



From: vittal korann 
Sent: Friday, December 30, 2022 3:56 PM
To: Huang, Yujing 
Cc: Freesurfer support list 
Subject: Re: [Freesurfer] Help: Aparcstats and asegstats not working


External Email - Use Caution
Thanks, Yujing, for your quick response.

I tried your suggestion as well but the same error keeps appearing.

$ asegstats2table --subjects Met001_1 Met002_1 Met003_1 Met005_1 Met006_1 
Met007_1 Met008_1 Met009_1 Met012_1 Met013_1 Met015_1 Met016_1 Met017_1 
Met018_1 Met019_1 Met020_1 Met021_1 Met022_1 Met023_1 Met024_1 Met025_1 
Met026_1 Met029_1 Met030_1 Met031_1 Met033_1 Met034_1 TOPIRA004_1 TOPIRA005_1 
TOPIRA012_1 TOPIRA013_1 TOPIRA019_1 TOPIRA021_1 TOPIRA022_1 TOPIRA024_1 
TOPIRA025_1 TOPIRA026_1 TOPIRA027_1 TOPIRA029_1 TOPIRA030_1 TOPIRA032_1 
Tao101_1 Tao103_1 Tao104_1 Tao105_1 Tao106_1 Tao107_1 Tao108_1 Tao111_1 
Tao112_1 Tao113_1 Tao115_1 Tao117_1 Tao118_1 Tao120_1 Tao121_1 Tao124_1 
Tao126_1 Tao127_1 C001_1 C002_1 C003_1 C004_1 C005_1 C006_1 C007_1 C008_1 
C009_1 C010_1 C011_1 C012_1 C013_1 C014_1 C015_1 C016_1 C017_1 C018_1 C019_1 
C020_1 C021_1 C023_1 C024_1 --hemi lh --meas. area --tablefile Area_aseg_stats 
txt

File "/usr/local/freesurfer/bin/asegstats2table", line 195
print 'ERROR: subjects are not specified (use --subjects SUBJECTS)'
  ^
SyntaxError: invalid syntax

I do not know where I am going wrong with this.
Any suggestion would be appreciated.

Thanks,
Vittal



On Fri, Dec 30, 2022 at 12:33 PM Huang, Yujing 
mailto:yhuan...@mgh.harvard.edu>> wrote:
Hi Vittal,

I can only repro your error by running ‘python asegstats2table …’.  And the 
alias solution works for me.

Running ‘asegstats2table’ directly doesn’t give me any errors, and it doesn’t 
need the alias setting.

Best,

Yujing

From: 
freesurfer-boun...@nmr.mgh.harvard.edu<mailto:freesurfer-boun...@nmr.mgh.harvard.edu>
 
mailto:freesurfer-boun...@nmr.mgh.harvard.edu>>
 On Behalf Of fsbuild
Sent: Friday, December 30, 2022 12:29 AM
To: freesurfer@nmr.mgh.harvard.edu<mailto:freesurfer@nmr.mgh.harvard.edu>
Cc: vittalkor...@gmail.com<mailto:vittalkor...@gmail.com>
Subject: Re: [Freesurfer] Help: Aparcstats and asegstats not working


External Email - Use Caution

SyntaxError: Missing parentheses in call to 'print'. Did you mean print('ERROR: 
atleast 1 subject must be provided')?
It does not look like you are running a python 2.X.  That may be because only 
python3 is installed by default.

$ which python
$ which python2
$ which python3
/bin/python3

… if you need to install python2, you can do it with ...

$ sudo apt update
$ sudo apt install python2

$ which python2
/bin/python2
$ python2 --version
Python 2.7.18

One way or another you need “python” to report it is a 2.X version *after* you 
set FREESURFER_HOME and source the freesurfer setup script.  To force “python” 
to run as “python2” you can try using an alias,

$ alias python=python2
$ python --version
Python 2.7.18
Similarly, if you needed python to run as python3 you could reset the alias to 
use =python3 instead.

For the error,
 print 'ERROR: subjects are not specified (use --subjects SUBJECTS)’
I would check the subjects you are listing as argument can be found as 
directories under what SUBJECTS_DIR is currently set to.

- R.

The information in this e-mail is intended only for the person to whom it is 
addressed.  If you believe this e-mail was sent to you in error and the e-mail 
contains patient information, please contact the Mass General Brigham 
Compliance HelpLine at 
https://www.massgeneralbrigham.org/complianceline<https://secure-web.cisco.com/1_2BAmFE3qXv20f0ybxnN-fpsohRoOoShMxWrzjXK9S8cPNIBCYqeBbQGLqgIZ-bS3q3YXsz0yZ_PMmmrgEFH_EO4_tt6fJDXrTPAcZdKwkwdrahEUhvwBc4VPmXx1axB0sUzZgCPbDJAYvqG7Q0WYmO8u4v80Tofdemy_pdkpMpHE1elT_5uGjKF89ma5bOalsMMsKKRwD3rN6TLvd1XgaVSpJOPUAXv1ZrSDJSrcBMWP1D4DM3incUVVYwuN5coRm9CbizTb_RmmbsKji8LMAR2U21qLrSeiMvX0DmNda5ZgFhWSvgqNdRjnuKRHjms/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline>
 .
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is 
addressed.  If you believe this e-mail was sent to you in error and the e-mail 
contains patient information, please contact the Mass General Brigham 
Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline 
<https://www.massgeneralbrigham.org/complianceline> .
Please note that this e-mail is not secure (encrypted).  If you do not wish to 
co

Re: [Freesurfer] Help: Aparcstats and asegstats not working

2022-12-30 Thread vittal korann
External Email - Use Caution

Thanks, Yujing, for your quick response.

I tried your suggestion as well but the same error keeps appearing.

$ asegstats2table --subjects Met001_1 Met002_1 Met003_1 Met005_1 Met006_1
Met007_1 Met008_1 Met009_1 Met012_1 Met013_1 Met015_1 Met016_1 Met017_1
Met018_1 Met019_1 Met020_1 Met021_1 Met022_1 Met023_1 Met024_1 Met025_1
Met026_1 Met029_1 Met030_1 Met031_1 Met033_1 Met034_1 TOPIRA004_1
TOPIRA005_1 TOPIRA012_1 TOPIRA013_1 TOPIRA019_1 TOPIRA021_1 TOPIRA022_1
TOPIRA024_1 TOPIRA025_1 TOPIRA026_1 TOPIRA027_1 TOPIRA029_1 TOPIRA030_1
TOPIRA032_1 Tao101_1 Tao103_1 Tao104_1 Tao105_1 Tao106_1 Tao107_1 Tao108_1
Tao111_1 Tao112_1 Tao113_1 Tao115_1 Tao117_1 Tao118_1 Tao120_1 Tao121_1
Tao124_1 Tao126_1 Tao127_1 C001_1 C002_1 C003_1 C004_1 C005_1 C006_1 C007_1
C008_1 C009_1 C010_1 C011_1 C012_1 C013_1 C014_1 C015_1 C016_1 C017_1
C018_1 C019_1 C020_1 C021_1 C023_1 C024_1 --hemi lh --meas area --tablefile
Area_aseg_stats.txt

File "/usr/local/freesurfer/bin/asegstats2table", line 195
print 'ERROR: subjects are not specified (use --subjects SUBJECTS)'
  ^
SyntaxError: invalid syntax

I do not know where I am going wrong with this.
Any suggestion would be appreciated.

Thanks,
Vittal




On Fri, Dec 30, 2022 at 12:33 PM Huang, Yujing 
wrote:

> Hi Vittal,
>
>
>
> I can only repro your error by running ‘python asegstats2table …’.  And
> the alias solution works for me.
>
>
>
> Running ‘asegstats2table’ directly doesn’t give me any errors, and it
> doesn’t need the alias setting.
>
>
>
> Best,
>
>
>
> Yujing
>
>
>
> *From:* freesurfer-boun...@nmr.mgh.harvard.edu <
> freesurfer-boun...@nmr.mgh.harvard.edu> *On Behalf Of *fsbuild
> *Sent:* Friday, December 30, 2022 12:29 AM
> *To:* freesurfer@nmr.mgh.harvard.edu
> *Cc:* vittalkor...@gmail.com
> *Subject:* Re: [Freesurfer] Help: Aparcstats and asegstats not working
>
>
>
> *External Email - Use Caution*
>
>
> SyntaxError: Missing parentheses in call to 'print'. Did you mean
> print('ERROR: atleast 1 subject must be provided')?
>
> It does not look like you are running a python 2.X.  That may be because
> only python3 is installed by default.
>
>
>
> $ which python
> $ which python2
> $ which python3
> /bin/python3
>
>
>
> … if you need to install python2, you can do it with ...
>
>
>
> $ sudo apt update
>
> $ sudo apt install python2
>
>
>
> $ which python2
>
> /bin/python2
>
> $ python2 --version
> Python 2.7.18
>
>
>
> One way or another you need “python” to report it is a 2.X version *after*
> you set FREESURFER_HOME and source the freesurfer setup script.  To force
> “python” to run as “python2” you can try using an alias,
>
>
>
> $ alias python=python2
>
> $ python --version
> Python 2.7.18
>
> Similarly, if you needed python to run as python3 you could reset the
> alias to use =python3 instead.
>
>
>
> For the error,
>
>  print 'ERROR: subjects are not specified (use --subjects SUBJECTS)’
>
> I would check the subjects you are listing as argument can be found as
> directories under what SUBJECTS_DIR is currently set to.
>
>
>
> - R.
>
>
>
> The information in this e-mail is intended only for the person to whom it
> is addressed.  If you believe this e-mail was sent to you in error and the
> e-mail contains patient information, please contact the Mass General
> Brigham Compliance HelpLine at
> https://secure-web.cisco.com/19vFAN3khDcvlUskxyhTYI6to-kX38th4pWvDUDnbBWQJ7FR_Ep8Xnq9k97hDZPseTitshpBRLvKMKZEobxZt1MoBl0B_A74appwj9SV8yp995CiBEoy3gKgzdO4GqYX3mRCtT7mPAktjR1Yoe_EAcrqTCFGqKgWzzcWA3tCTAQKZyu7nNnS6ELaWG1BlWXnv9bC8piZd3_myQE9taMNPcDIdlE48cTRZsgSOgyVOMplWZqZ25xi7qIBYE05Q-7DJGaWUzyy69qXcYHJdYpgORxyVKK1UuIXkuYgiMfkRdafxDN-5SMTjA5VLuMnDqxFS/https%3A%2F%2Fwww.massgeneralbrigham.org%2Fcomplianceline
>  .
>
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is 
addressed.  If you believe this e-mail was sent to you in error and the e-mail 
contains patient information, please contact the Mass General Brigham 
Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline 
<https://www.massgeneralbrigham.org/complianceline> .
Please note that this e-mail is not secure (encrypted).  If you do not wish to 
continue communication over unencrypted e-mail, please notify the sender of 
this message immediately.  Continuing to send or respond to e-mail after 
receiving this message means you understand and accept this risk and wish to 
continue to communicate over unencrypted e-mail. 


Re: [Freesurfer] Help: Aparcstats and asegstats not working

2022-12-30 Thread vittal korann
External Email - Use Caution

Thanks, for your quick response.

I installed python2 and did set the default version to python 2.7.18 via
aliasing.
But I am getting the same old errors again. The same terminal responses
were listed below.
The subjects that are used for aseg/aparc are listed in the folder SUBJECTS
under freesurfer

$ asegstats2table --subjects Met001_1 Met002_1 --hemi lh --meas area
--tablefile Area_aseg_stats.txt
 File "/usr/local/freesurfer/bin/aparcstats2table", line 156
print 'ERROR: atleast 1 subject must be provided'
  ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean
print('ERROR: atleast 1 subject must be provided')?

$which python2
/usr/bin/python2

$ python --version
Python 2.7.18

$ export FREESURFER_HOME=/usr/local/freesurfer
$ source $FREESURFER_HOME/SetUpFreeSurfer.sh
 freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0-2beb96c 
Setting up environment for FreeSurfer/FS-FAST (and FSL)
FREESURFER_HOME   /usr/local/freesurfer
FSFAST_HOME   /usr/local/freesurfer/fsfast
FSF_OUTPUT_FORMAT nii.gz
SUBJECTS_DIR  /usr/local/freesurfer/subjects
MNI_DIR   /usr/local/freesurfer/mni
FSL_DIR   /usr/local/fsl

$ sh aseg_stats_extraction.sh

  File "/usr/local/freesurfer/bin/asegstats2table", line 195
print 'ERROR: subjects are not specified (use --subjects SUBJECTS)'
  ^
SyntaxError: invalid syntax
  File "/usr/local/freesurfer/bin/asegstats2table", line 195
print 'ERROR: subjects are not specified (use --subjects SUBJECTS)'
  ^
SyntaxError: invalid syntax
  File "/usr/local/freesurfer/bin/aparcstats2table", line 156
print 'ERROR: atleast 1 subject must be provided'
  ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean
print('ERROR: atleast 1 subject must be provided')?
  File "/usr/local/freesurfer/bin/aparcstats2table", line 156
print 'ERROR: atleast 1 subject must be provided'
  ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean
print('ERROR: atleast 1 subject must be provided')?

I also attached the shell script file that I created for thickness and area
extraction from the list of subjects.
Is this because something is wrong in the bash_profile/bashrc file? I don't
know I am just guessing.

Any help would be appreciated!

Thanks,
Vittal



On Fri, Dec 30, 2022 at 12:29 AM fsbuild  wrote:

>
> SyntaxError: Missing parentheses in call to 'print'. Did you mean
> print('ERROR: atleast 1 subject must be provided')?
>
> It does not look like you are running a python 2.X.  That may be because
> only python3 is installed by default.
>
> $ which python
> $ which python2
> $ which python3
> /bin/python3
>
> … if you need to install python2, you can do it with ...
>
> $ sudo apt update
> $ sudo apt install python2
>
> $ which python2
> /bin/python2
> $ python2 --version
> Python 2.7.18
>
> One way or another you need “python” to report it is a 2.X version *after*
> you set FREESURFER_HOME and source the freesurfer setup script.  To force
> “python” to run as “python2” you can try using an alias,
>
> $ alias python=python2
> $ python --version
> Python 2.7.18
>
> Similarly, if you needed python to run as python3 you could reset the
> alias to use =python3 instead.
>
> For the error,
>
>  print 'ERROR: subjects are not specified (use --subjects SUBJECTS)’
>
> I would check the subjects you are listing as argument can be found as
> directories under what SUBJECTS_DIR is currently set to.
>
> - R.
>
>
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is 
addressed.  If you believe this e-mail was sent to you in error and the e-mail 
contains patient information, please contact the Mass General Brigham 
Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline 
 .
Please note that this e-mail is not secure (encrypted).  If you do not wish to 
continue communication over unencrypted e-mail, please notify the sender of 
this message immediately.  Continuing to send or respond to e-mail after 
receiving this message means you understand and accept this risk and wish to 
continue to communicate over unencrypted e-mail. 


Re: [Freesurfer] Help: Aparcstats and asegstats not working

2022-12-30 Thread Huang, Yujing
Hi Vittal,

I can only repro your error by running ‘python asegstats2table …’.  And the 
alias solution works for me.

Running ‘asegstats2table’ directly doesn’t give me any errors, and it doesn’t 
need the alias setting.

Best,

Yujing

From: freesurfer-boun...@nmr.mgh.harvard.edu 
 On Behalf Of fsbuild
Sent: Friday, December 30, 2022 12:29 AM
To: freesurfer@nmr.mgh.harvard.edu
Cc: vittalkor...@gmail.com
Subject: Re: [Freesurfer] Help: Aparcstats and asegstats not working


External Email - Use Caution

SyntaxError: Missing parentheses in call to 'print'. Did you mean print('ERROR: 
atleast 1 subject must be provided')?
It does not look like you are running a python 2.X.  That may be because only 
python3 is installed by default.

$ which python
$ which python2
$ which python3
/bin/python3

… if you need to install python2, you can do it with ...

$ sudo apt update
$ sudo apt install python2

$ which python2
/bin/python2
$ python2 --version
Python 2.7.18

One way or another you need “python” to report it is a 2.X version *after* you 
set FREESURFER_HOME and source the freesurfer setup script.  To force “python” 
to run as “python2” you can try using an alias,

$ alias python=python2
$ python --version
Python 2.7.18
Similarly, if you needed python to run as python3 you could reset the alias to 
use =python3 instead.

For the error,
 print 'ERROR: subjects are not specified (use --subjects SUBJECTS)’
I would check the subjects you are listing as argument can be found as 
directories under what SUBJECTS_DIR is currently set to.

- R.

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is 
addressed.  If you believe this e-mail was sent to you in error and the e-mail 
contains patient information, please contact the Mass General Brigham 
Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline 
<https://www.massgeneralbrigham.org/complianceline> .
Please note that this e-mail is not secure (encrypted).  If you do not wish to 
continue communication over unencrypted e-mail, please notify the sender of 
this message immediately.  Continuing to send or respond to e-mail after 
receiving this message means you understand and accept this risk and wish to 
continue to communicate over unencrypted e-mail. 


Re: [Freesurfer] Help: Aparcstats and asegstats not working

2022-12-29 Thread fsbuild
External Email - Use Caution

SyntaxError: Missing parentheses in call to 'print'. Did you mean print('ERROR: 
atleast 1 subject must be provided')?It does not look like you are running a 
python 2.X. That may be because only python3 is installed by default.
$ which python
$ which python2
$ which python3
/bin/python3

… if you need to install python2, you can do it with ...
$sudo apt update$ sudo apt install python2
$ which python2/bin/python2$python2 --version
Python 2.7.18

One way or another you need “python” to report it is a 2.X version *after* you 
set FREESURFER_HOME and source the freesurfer setup script. To force 
“python” to run as “python2” you can try using an alias,
$alias python=python2$python --version
Python 2.7.18

Similarly, if you needed python to run as python3 you could reset the alias to 
use =python3 instead.
For the error, 
print 'ERROR: subjects are not specified (use --subjects SUBJECTS)’I 
would check the subjects you are listing as argument can be found as 
directories under what SUBJECTS_DIR is currently set to.
- R.

___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is 
addressed.  If you believe this e-mail was sent to you in error and the e-mail 
contains patient information, please contact the Mass General Brigham 
Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline 
 .
Please note that this e-mail is not secure (encrypted).  If you do not wish to 
continue communication over unencrypted e-mail, please notify the sender of 
this message immediately.  Continuing to send or respond to e-mail after 
receiving this message means you understand and accept this risk and wish to 
continue to communicate over unencrypted e-mail. 


[Freesurfer] Help: Aparcstats and asegstats not working

2022-12-29 Thread vittal korann
External Email - Use Caution

Hi Freesurfer experts,

I am trying to collate all morphological parameters like thickness, area,
volume, etc.
When I tried executing the command " asegstats2table --subjects Met001
met002   --hemi lh --meas area --tablefile Area_aseg_stats.txt ", it
failed and I got the below error which is highlighted.

 File "/usr/local/freesurfer/bin/asegstats2table", line 195
print 'ERROR: subjects are not specified (use --subjects SUBJECTS)'
  ^
SyntaxError: invalid syntax
  File "/usr/local/freesurfer/bin/asegstats2table", line 195
print 'ERROR: subjects are not specified (use --subjects SUBJECTS)'
  ^
SyntaxError: invalid syntax
  File "/usr/local/freesurfer/bin/aparcstats2table", line 156
print 'ERROR: atleast 1 subject must be provided'
  ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean
print('ERROR: atleast 1 subject must be provided')?
  File "/usr/local/freesurfer/bin/aparcstats2table", line 156
print 'ERROR: atleast 1 subject must be provided'
  ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean
print('ERROR: atleast 1 subject must be provided')?

I am using the Freesurfer version6 and ubuntu 20.04.
A similar error was reported in the forum and I also tried the suggested
solution by setting python2.7 as the default version. However, nothing has
worked out for me.

Any help would be highly appreaciated.

Thanks,
Vittal
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is 
addressed.  If you believe this e-mail was sent to you in error and the e-mail 
contains patient information, please contact the Mass General Brigham 
Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline 
 .
Please note that this e-mail is not secure (encrypted).  If you do not wish to 
continue communication over unencrypted e-mail, please notify the sender of 
this message immediately.  Continuing to send or respond to e-mail after 
receiving this message means you understand and accept this risk and wish to 
continue to communicate over unencrypted e-mail.