ANTsR icon indicating copy to clipboard operation
ANTsR copied to clipboard

Python 2.7 Error

Open jonesnat opened this issue 1 year ago • 1 comments

Describe the bug I am getting a PyType_GetFlags error when I type this command: mdl = getBrainAgeModel( tempfile() ) in R.

Below is the error message: Error: PyType_GetFlags - /usr/lib64/python2.7/config/libpython2.7.so: undefined symbol: PyType_GetFlags

To Reproduce Steps to reproduce the behavior:

  1. Load Python 3.10 and R 4.3.1
  2. Start R session
  3. Load required libraries in R: brainAgeR, ANTsR, tensorflow, keras
  4. Type filename = system.file("extdata", "test_image.nii.gz", package = "brainAgeR", mustWork = TRUE)
  5. Type img = antsImageRead( filename )
  6. Run getBrainAgeModel command: mdl = getBrainAgeModel( tempfile() )
  7. See error

Expected behavior Not get the error message

Desktop (please complete the following information):

  • OS: RHEL8
  • High performance computing cluster

Additional context Since Python2.7 is deprecated is there a plan to update to Python3?

jonesnat avatar Jul 01 '24 18:07 jonesnat

Can you provide more context on the interplay between R and Python here - What do you mean by "Load Python 3.10.." ? Are you calling R from within Python, or vice-versa? I don't understand why you would get a Python error in ANTsR otherwise.

And in any case - we don't support Python2.7 in ANTsPy anymore.

ncullen93 avatar Jul 05 '24 08:07 ncullen93