Sage-Bionetworks / synapser

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

Installation Fails on R 4.1.0 #299

Closed ayushnoori closed 3 years ago

ayushnoori commented 3 years ago

Details

Running fresh installation of R 4.1.0 on Windows 10.

Description

synapser installation fails on R 4.1.0 with the following error:

Error: package or namespace load failed for 'synapser' in library.dynam(lib, package, package.lib):
 DLL 'PythonEmbedInR' not found: maybe not installed for this architecture?
Error: loading failed
Execution halted
*** arch - x64
ERROR: loading failed for 'i386'

However, I previously installed PythonEmbedInR successfully with the following:

install.packages("PythonEmbedInR", repos=c("http://cran.fhcrc.org", "http://ran.synapse.org"))

Indeed, the PythonEmbedInR package loads successfully:

> library(PythonEmbedInR)
Loading required package: R6
Loading required package: rjson

sessionInfo() Output

R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] parallel  stats4    stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] PythonEmbedInR_0.7.80 rjson_0.2.20          R6_2.5.0              devtools_2.4.1        usethis_2.0.1         GO.db_3.13.0         
 [7] AnnotationDbi_1.54.0  IRanges_2.26.0        S4Vectors_0.30.0      Biobase_2.52.0        BiocGenerics_0.38.0   remotes_2.3.0    
ayushnoori commented 3 years ago

To clarify, the installation fails whether I run either of the following:

install.packages("synapser", repos=c("http://ran.synapse.org", "http://cran.fhcrc.org"))
devtools::install_github("Sage-Bionetworks/synapser")

Of course, the installation of synapserutils fails as well.

jkiang13 commented 3 years ago

@ayushnoori I've built a test version of synapser under R 4.1.

Could you do a test installation from our staging repository as follows and confirm that it installs successfully in your environment? Thanks.

install.packages("synapser", repos=c("http://staging-ran.synapse.org", "http://cran.fhcrc.org"))

ayushnoori commented 3 years ago

Hi @jkiang13, the synapser package installs and loads successfully!

> install.packages("synapser", repos=c("http://staging-ran.synapse.org", "http://cran.fhcrc.org"))
trying URL 'http://staging-ran.synapse.org/bin/windows/contrib/4.1/synapser_0.10.101.zip'
Content type 'application/zip' length 31492309 bytes (30.0 MB)
downloaded 30.0 MB

package ‘synapser’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\ayush\AppData\Local\Temp\RtmpqukwLf\downloaded_packages

Wanted to let you know that the synapserutils package install is still unsuccessful with the same error - I suspect you haven't built a test version of this yet? Hence, I will leave this issue open for now unless you suggest otherwise.

jkiang13 commented 3 years ago

Hi @ayushnoori sorry for the delayed response.

The 4.1.0 compatible packages for synapser and PythonEmbedInR have been deployed to the normal synapse ran server (ran.synapse.org) and so an installation no longer requires using the staging versions as above.

As for synapserutils, can you show the output of the error you are getting? Unlike synapser and PythonEmbedInR, synapserutils is only distributed as a source package and shouldn't need to be updated to support 4.1.0 directly. I have not been able to reproduce an error installing it on Windows 10 with the now available updated binaries.

> install.packages("synapserutils", repos=c("http://ran.synapse.org", "http://$
Installing package into 'C:/temp/renv/renv/library/R-4.1/x86_64-w64-mingw32'
(as 'lib' is unspecified)
also installing the dependencies 'R6', 'rjson', 'pack', 'synapser', 'PythonEmbedInR'

trying URL 'http://cran.fhcrc.org/bin/windows/contrib/4.1/R6_2.5.0.zip'
Content type 'application/zip' length 84097 bytes (82 KB)
downloaded 82 KB

trying URL 'http://cran.fhcrc.org/bin/windows/contrib/4.1/rjson_0.2.20.zip'
Content type 'application/zip' length 755197 bytes (737 KB)
downloaded 737 KB

trying URL 'http://cran.fhcrc.org/bin/windows/contrib/4.1/pack_0.1-1.zip'
Content type 'application/zip' length 28558 bytes (27 KB)
downloaded 27 KB

trying URL 'http://ran.synapse.org/bin/windows/contrib/4.1/synapser_0.10.101.zip'
Content type 'application/zip' length 31492309 bytes (30.0 MB)
downloaded 30.0 MB

trying URL 'http://ran.synapse.org/bin/windows/contrib/4.1/PythonEmbedInR_0.7.84.zip'
Content type 'application/zip' length 45881651 bytes (43.8 MB)
downloaded 43.8 MB

package 'R6' successfully unpacked and MD5 sums checked
package 'rjson' successfully unpacked and MD5 sums checked
package 'pack' successfully unpacked and MD5 sums checked
package 'synapser' successfully unpacked and MD5 sums checked
package 'PythonEmbedInR' successfully unpacked and MD5 sums checked

The downloaded binary packages are in
        C:\Users\Administrator\AppData\Local\Temp\2\Rtmpk7Dbu2\downloaded_packages
installing the source package 'synapserutils'

trying URL 'http://ran.synapse.org/src/contrib/synapserutils_0.1.6.tar.gz'
Content type 'application/x-tar' length 15019 bytes (14 KB)
downloaded 14 KB

Attaching package: 'renv'

The following objects are masked from 'package:base':

    load, remove

Warning in strptime(xx, f, tz = tz) :
  unable to identify current timezone 'C':
please set environment variable 'TZ'
* installing *source* package 'synapserutils' ...
** using staged installation

TERMS OF USE NOTICE:
  When using Synapse, remember that the terms and conditions of use require that you:
  1) Attribute data contributors when discussing these data or results from these data.
  2) Not discriminate, identify, or recontact individuals or groups represented by the data.
  3) Use and contribute only data de-identified to HIPAA standards.
  4) Redistribute data only under these same terms of use.

** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
  converting help for package 'synapserutils'
    finding HTML links ... done
    changeFileMetaData                      html
    copy                                    html
    copyFileHandles                         html
    copyWiki                                html
    syncFromSynapse                         html
    syncToSynapse                           html
    walk                                    html
** building package indices
** testing if installed package can be loaded from temporary location
*** arch - i386
*** arch - x64
** testing if installed package can be loaded from final location
*** arch - i386
*** arch - x64
** testing if installed package keeps a record of temporary installation path
* DONE (synapserutils)

The downloaded source packages are in
        'C:\Users\Administrator\AppData\Local\Temp\2\Rtmpk7Dbu2\downloaded_packages'
ayushnoori commented 3 years ago

Hi @jkiang13, no worries. I suspect that the issue was with the underlying PythonEmbedInR dependency. After reinstalling both synapser and PythonEmbedInR from ran.synapse.org, I was able to successfully install synapserutils. Glad this issue is resolved - thanks so much for your help!