Sage-Bionetworks / synapser

An R package providing programmatic access to Synapse
Apache License 2.0
32 stars 21 forks source link

Failed to install PythonEmbedInR #305

Closed rrchai closed 1 year ago

rrchai commented 2 years ago

Operating system

Max OSX 12.3.1

Description of the problem

One collaborator reported unsuccessful installation of synapser by running install.packages("synapser", repos=c("http://ran.synapse.org/", "http://cran.fhcrc.org/")). It looks like the /usr/local/opt/openssl/lib/libcrypto.1*.dylib couldn't be found when installing the PythonEmbedInR package (full errors are listed below).

Expected behavior

synapser should be installed successfully.

Actual behavior

 install.packages("synapser", repos=c("http://ran.synapse.org/", "http://cran.fhcrc.org/"))
also installing the dependency 'PythonEmbedInR'

Warning in install.packages :
  unable to access index for repository http://ran.synapse.org/bin/macosx/contrib/4.2:
  cannot open URL 'http://ran.synapse.org/bin/macosx/contrib/4.2/PACKAGES'
Package which is only available in source form, and may need compilation of C/C++/Fortran:
  'PythonEmbedInR'
Do you want to attempt to install these from sources? (Yes/no/cancel) yes
installing the source packages 'PythonEmbedInR', 'synapser'

trying URL 'http://ran.synapse.org/src/contrib/PythonEmbedInR_0.8.4.tar.gz'
Content type 'application/x-tar' length 95306 bytes (93 KB)
==================================================
downloaded 93 KB

trying URL 'http://ran.synapse.org/src/contrib/synapser_0.11.7.tar.gz'
Content type 'application/x-tar' length 134168 bytes (131 KB)
==================================================
downloaded 131 KB

* installing *source* package 'PythonEmbedInR' ...
** using staged installation
                                 ...
 22450K .......... ..........                                 100% 23.5M=1.0s
2022-06-01 12:31:46 (22.3 MB/s) - 'Python-3.6.8.tgz' saved [23010188/23010188]
Mac specific configuration
ls: /usr/local/opt/openssl/lib/libcrypto.1*.dylib: No such file or directory
ERROR: configuration failed for package 'PythonEmbedInR'
* removing '/Library/Frameworks/R.framework/Versions/4.2/Resources/library/PythonEmbedInR'
Warning in install.packages :
  installation of package 'PythonEmbedInR' had non-zero exit status
ERROR: dependency 'PythonEmbedInR' is not available for package 'synapser'
* removing '/Library/Frameworks/R.framework/Versions/4.2/Resources/library/synapser'
Warning in install.packages :
  installation of package 'synapser' had non-zero exit status

The downloaded source packages are in
    '/private/var/folders/yw/z16m_yvs4sgg4nt4jcg8y5txvlw4tj/T/Rtmp9hGe5V/downloaded_packages'

Output of sessionInfo()

rrchai commented 2 years ago

Here are what we have tried:

1. reinstall openssl

> brew update && brew upgrade
> brew uninstall openssl
> brew install openssl
> openssl version
LibreSSL 2.8.3

restart rstudio and run install.packages("synapser", repos=c("http://ran.synapse.org/", "http://cran.fhcrc.org/"))

2. add openssl path

> ls /usr/local/opt | grep "openssl"
openssl
openssl@1.1
openssl@3

> echo 'export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"' >> ~/.bash_profile
> cat ~/.bash_profile
# .bash_profile
PATH=/usr/local/opt/openssl@1.1/bin:$PATH
export PATH

> source ~/.bashrc

> openssl version
OpenSSL 1.1.1o 3 May 2022

restart rstudio and run install.packages("synapser", repos=c("http://ran.synapse.org/", "http://cran.fhcrc.org/"))


Both 1 and 2 failed with the same error.

brucehoff commented 2 years ago

@rrchai We believe we have solve the issue. Can you please ask the collaborator to try installing the client again? Details tracked here: https://sagebionetworks.jira.com/browse/SYNR-1495

rrchai commented 1 year ago

Confirmed with the collaborator that she is able to install synapser now. Thanks @brucehoff !

anlo328 commented 1 year ago

Hi everyone. I'm getting the exact same error as OP when trying to install synapser on a newly setup M1 Mac (v12.6). May the different chip be the issue? Happy about any advice, thanks.

brucehoff commented 1 year ago

@anlo328 Indeed the package does not work on M1 Mac and that is due to the hardware (chip).

anlo328 commented 1 year ago

Thanks for the reply. I'll resort to using the software on Windows for now but perhaps someone can tag me if this gets solved sometime

ArtemSokolov commented 1 year ago

This issue appears to persist in the latest R/tidyverse environment. Steps to reproduce:

docker run rocker/tidyverse \
  R -e 'install.packages("synapser", repos=c("http://ran.synapse.org", "http://cran.fhcrc.org"))'

which fails with

...
Looking in links: /tmp/tmp85tflpfm
Collecting setuptools
Collecting pip
Installing collected packages: setuptools, pip
Successfully installed pip-18.1 setuptools-40.6.2
Segmentation fault
ERROR: configuration failed for package ‘PythonEmbedInR’
* removing ‘/usr/local/lib/R/site-library/PythonEmbedInR’
ERROR: dependency ‘PythonEmbedInR’ is not available for package ‘synapser’
* removing ‘/usr/local/lib/R/site-library/synapser’

The downloaded source packages are in
        ‘/tmp/RtmpH70Pmj/downloaded_packages’
Warning messages:
1: In install.packages("synapser", repos = c("http://ran.synapse.org",  :
  installation of package ‘PythonEmbedInR’ had non-zero exit status
2: In install.packages("synapser", repos = c("http://ran.synapse.org",  :
  installation of package ‘synapser’ had non-zero exit status
thomasyu888 commented 1 year ago

Hello @ArtemSokolov

Thanks for using synapser. We are currently working on upgrading the client and plan to have a working version hopefully by mid January. Apologies for any inconveniences!

I will try to think of an interim solution.

thomasyu888 commented 1 year ago

Closing because of the new synapser deployment