Python 2.7 Error
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:
- Load Python 3.10 and R 4.3.1
- Start R session
- Load required libraries in R: brainAgeR, ANTsR, tensorflow, keras
- Type
filename = system.file("extdata", "test_image.nii.gz", package = "brainAgeR", mustWork = TRUE) - Type
img = antsImageRead( filename ) - Run getBrainAgeModel command:
mdl = getBrainAgeModel( tempfile() ) - 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?
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.