Thanks Chris,
Good point. We can get on this. I’ll investigate putting in a quick fix.
The requirement for numpy<2 stems from complications with building cython utilities. I think we should ditch these utilities and instead rely on prebuilt tools (eg scipy). It sacrifices some minor runtime, but will relieve major distribution headache. That project is a bit more involved but hopefully we can get to it soon.
Andrew
From: Rorden, Chris RORDEN@mailbox.sc.edu Date: Thursday, August 14, 2025 at 12:22 PM To: freesurfer@nmr.mgh.harvard.edu freesurfer@nmr.mgh.harvard.edu, Hoopes, Andrew AHOOPES@mgh.harvard.edu Subject: Surfa update External Email - Use Caution
Hello
Would it be possible to release a version of surfa that uses numpy 2? For examples, the original version of synthsr and the one included with FreeSurfer rely on Python versions that are end of life. I upgraded this to use up to Python 3.13 (latest version supported by TensorFlow), but the Surfa support demand for numpy 1 requires special environment so it does not play well with other tools (surfa pyproject.toml notes 'numpy<2.0’).
I really do not want to maintain a separate fork, and if we could upgrade surfa the maintained FreeSurfer project could include versions of these scripts that support maintained versions of Python.
For the time being, here is my fork: https://secure-web.cisco.com/1Tj_72h5VBPhEzQKtS8Wnrte2Od2rEUMf2iVThbaWZrFxeD...
Thanks for all your work,
-chris
The restriction of numpy <2 in surfa has been removed - https://github.com/freesurfer/surfa/commit/5fd1b27fa774db0190a5b9a6a00817a4e...
A new surfa need to be published to reflect that.
Yujing
From: Hoopes, Andrew AHOOPES@mgh.harvard.edu Sent: Monday, August 18, 2025 10:27 AM To: RORDEN, CHRIS RORDEN@mailbox.sc.edu; freesurfer@nmr.mgh.harvard.edu Subject: [Freesurfer] Re: Surfa update
Thanks Chris,
Good point. We can get on this. I'll investigate putting in a quick fix.
The requirement for numpy<2 stems from complications with building cython utilities. I think we should ditch these utilities and instead rely on prebuilt tools (eg scipy). It sacrifices some minor runtime, but will relieve major distribution headache. That project is a bit more involved but hopefully we can get to it soon.
Andrew
From: Rorden, Chris <RORDEN@mailbox.sc.edumailto:RORDEN@mailbox.sc.edu> Date: Thursday, August 14, 2025 at 12:22 PM To: freesurfer@nmr.mgh.harvard.edumailto:freesurfer@nmr.mgh.harvard.edu <freesurfer@nmr.mgh.harvard.edumailto:freesurfer@nmr.mgh.harvard.edu>, Hoopes, Andrew <AHOOPES@mgh.harvard.edumailto:AHOOPES@mgh.harvard.edu> Subject: Surfa update External Email - Use Caution
Hello
Would it be possible to release a version of surfa that uses numpy 2? For examples, the original version of synthsr and the one included with FreeSurfer rely on Python versions that are end of life. I upgraded this to use up to Python 3.13 (latest version supported by TensorFlow), but the Surfa support demand for numpy 1 requires special environment so it does not play well with other tools (surfa pyproject.toml notes 'numpy<2.0').
I really do not want to maintain a separate fork, and if we could upgrade surfa the maintained FreeSurfer project could include versions of these scripts that support maintained versions of Python.
For the time being, here is my fork: https://secure-web.cisco.com/1Tj_72h5VBPhEzQKtS8Wnrte2Od2rEUMf2iVThbaWZrFxeD...
Thanks for all your work,
-chris
Surfa 0.6.3 is now released, and it supports numpy 2.
There were a few distribution related changes needed to enforce cython builds at install time, but all taken care of now.
Please let me know if you come across any issues.
Best, Andrew
From: Huang, Yujing YHUANG43@mgh.harvard.edu Date: Monday, August 18, 2025 at 10:43 AM To: Freesurfer support list freesurfer@nmr.mgh.harvard.edu Subject: [Freesurfer] Re: Surfa update The restriction of numpy <2 in surfa has been removed - https://github.com/freesurfer/surfa/commit/5fd1b27fa774db0190a5b9a6a00817a4e...
A new surfa need to be published to reflect that.
Yujing
From: Hoopes, Andrew AHOOPES@mgh.harvard.edu Sent: Monday, August 18, 2025 10:27 AM To: RORDEN, CHRIS RORDEN@mailbox.sc.edu; freesurfer@nmr.mgh.harvard.edu Subject: [Freesurfer] Re: Surfa update
Thanks Chris,
Good point. We can get on this. I’ll investigate putting in a quick fix.
The requirement for numpy<2 stems from complications with building cython utilities. I think we should ditch these utilities and instead rely on prebuilt tools (eg scipy). It sacrifices some minor runtime, but will relieve major distribution headache. That project is a bit more involved but hopefully we can get to it soon.
Andrew
From: Rorden, Chris <RORDEN@mailbox.sc.edumailto:RORDEN@mailbox.sc.edu> Date: Thursday, August 14, 2025 at 12:22 PM To: freesurfer@nmr.mgh.harvard.edumailto:freesurfer@nmr.mgh.harvard.edu <freesurfer@nmr.mgh.harvard.edumailto:freesurfer@nmr.mgh.harvard.edu>, Hoopes, Andrew <AHOOPES@mgh.harvard.edumailto:AHOOPES@mgh.harvard.edu> Subject: Surfa update External Email - Use Caution
Hello
Would it be possible to release a version of surfa that uses numpy 2? For examples, the original version of synthsr and the one included with FreeSurfer rely on Python versions that are end of life. I upgraded this to use up to Python 3.13 (latest version supported by TensorFlow), but the Surfa support demand for numpy 1 requires special environment so it does not play well with other tools (surfa pyproject.toml notes 'numpy<2.0’).
I really do not want to maintain a separate fork, and if we could upgrade surfa the maintained FreeSurfer project could include versions of these scripts that support maintained versions of Python.
For the time being, here is my fork: https://secure-web.cisco.com/1Tj_72h5VBPhEzQKtS8Wnrte2Od2rEUMf2iVThbaWZrFxeD...
Thanks for all your work,
-chris
freesurfer@nmr.mgh.harvard.edu