ANTsX / ANTsR

R interface to the ANTs biomedical image processing library
https://antsx.github.io/ANTsR
Apache License 2.0
127 stars 35 forks source link

Installation error on Mac OS 12.6.3 with devtools #387

Open afni-gangc opened 1 year ago

afni-gangc commented 1 year ago

Describe the bug

Tried to install ANTsR with the command in R (version is 4.3.0) on MacBook Air (OS 12.6.3):

devtools::install_github('ANTsX/ANTsR')

It failed after two hours of compiling with the following error at the end:

Error: package or namespace load failed for ‘ANTsR’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/00LOCK-ANTsR/00new/ANTsR/libs/ANTsR.so': dlopen(/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/00LOCK-ANTsR/00new/ANTsR/libs/ANTsR.so, 0x0006): symbol not found in flat namespace (_composeDisplacementFields) Error: loading failed

To Reproduce Steps to reproduce the behavior:

  1. devtools::install_github('ANTsX/ANTsR')

Desktop (please complete the following information):

Additional context See attached text for the full installation log. ANTsR.install.error.txt

ntustison commented 1 year ago

Can you try installing it in steps?

> devtools::install_github('stnava/ITKR')
> devtools::install_github('ANTsX/ANTsRCore')
> devtools::install_github('ANTsX/ANTsR')
afni-gangc commented 1 year ago

Thanks!

After another two hours of installation, the first two commands worked, but the third one

devtools::install_github('ANTsX/ANTsR')

still failed. Still upload the log?

From: Nick Tustison @.> Date: Friday, May 19, 2023 at 9:26 AM To: ANTsX/ANTsR @.> Cc: Chen, Gang (NIH/NIMH) [E] @.>, Author @.> Subject: [EXTERNAL] Re: [ANTsX/ANTsR] Installation error on Mac OS 12.6.3 (Issue #387)

Can you try installing it in steps?

devtools::install_github('stnava/ITKR')

devtools::install_github('ANTsX/ANTsRCore')

devtools::install_github('ANTsX/ANTsR')

— Reply to this email directly, view it on GitHubhttps://github.com/ANTsX/ANTsR/issues/387#issuecomment-1554575761, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACPFE6MGLTJ5JMKPXLWS63TXG5YHHANCNFSM6AAAAAAYHGGTPU. You are receiving this because you authored the thread.Message ID: @.***> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and are confident the content is safe.

ntustison commented 1 year ago

Is it still the same error?

afni-gangc commented 1 year ago

Looks like the same error:

** testing if installed package can be loaded from temporary location

Error: package or namespace load failed for ‘ANTsR’ in dyn.load(file, DLLpath = DLLpath, ...):

unable to load shared object '/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/00LOCK-ANTsR/00new/ANTsR/libs/ANTsR.so':

dlopen(/Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library/00LOCK-ANTsR/00new/ANTsR/libs/ANTsR.so, 0x0006): symbol not found in flat namespace (_composeDisplacementFields)

Error: loading failed

Execution halted

ERROR: loading failed

Warning message:

In i.p(...) :

installation of package ‘/var/folders/0z/m_31mkc564bbkx8hh2_wvrfc0000gx/T//RtmpTbtUP6/filefe6c43a65c9e/ANTsR_0.5.7.5.tar.gz’ had non-zero exit status

From: Nick Tustison @.> Date: Friday, May 19, 2023 at 11:37 AM To: ANTsX/ANTsR @.> Cc: Chen, Gang (NIH/NIMH) [E] @.>, Author @.> Subject: [EXTERNAL] Re: [ANTsX/ANTsR] Installation error on Mac OS 12.6.3 (Issue #387)

Is it still the same error?

— Reply to this email directly, view it on GitHubhttps://github.com/ANTsX/ANTsR/issues/387#issuecomment-1554765686, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACPFE6JNZS533SATJUCZA3LXG6HTXANCNFSM6AAAAAAYHGGTPU. You are receiving this because you authored the thread.Message ID: @.***> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and are confident the content is safe.

cookpa commented 1 year ago

Same issue as #377 (on Linux).

ntustison commented 1 year ago

Thanks @cookpa

afni-gangc commented 1 year ago

Thanks for the pointer! Method 2 worked. However, when I tried to test the installation per the site https://gist.github.com/ntustison/12a656a5fc2f6f9c4494c88dc09c5621#brain-extraction, the following command

t1 <- antsImageRead( getANTsXNetData( 'mprage_hippmapp3r' ) )

led to error:

t1 <- antsImageRead( getANTsXNetData( 'mprage_hippmapp3r' ) )

Downloading data from https://ndownloader.figshare.com/files/24984689

Error in py_call_impl(callable, call_args$unnamed, call_args$named) :

Exception: URL fetch failure on https://ndownloader.figshare.com/files/24984689: None -- [SSL: UNSAFE_LEGACY_RENEGOTIATION_DISABLED] unsafe legacy renegotiation disabled (_ssl.c:1129)

Run reticulate::py_last_error() for details.

From: Nick Tustison @.> Date: Friday, May 19, 2023 at 1:53 PM To: ANTsX/ANTsR @.> Cc: Chen, Gang (NIH/NIMH) [E] @.>, Author @.> Subject: [EXTERNAL] Re: [ANTsX/ANTsR] Installation error on Mac OS 12.6.3 (Issue #387)

Thanks @cookpahttps://github.com/cookpa

— Reply to this email directly, view it on GitHubhttps://github.com/ANTsX/ANTsR/issues/387#issuecomment-1555031078, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACPFE6KRPYWQRBC3URDVQ5TXG6XQ3ANCNFSM6AAAAAAYHGGTPU. You are receiving this because you authored the thread.Message ID: @.***> CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and are confident the content is safe.

ntustison commented 1 year ago

Maybe a local access issue. Try directly copying and pasting the url in your browser. Should download a nifti image.

cookpa commented 1 year ago

I believe the "UNSAFE_LEGACY_RENEGOTIATION_DISABLED" is a Python issue that will be fixed in a later version of Python (https://github.com/python/cpython/pull/93927).

Most users will probably just want to download manually, but other workarounds have been suggested online, including downgrading Python < 3.11. Reticulate can be made to use a specified conda environment if needed https://rstudio.github.io/reticulate/

ntustison commented 1 year ago

Thanks again @cookpa

muschellij2 commented 8 months ago

Confirming _composeDisplacementFields is an issue as well on MacOS on my end