ImmuneDynamics / Spectre

A computational toolkit in R for the integration, exploration, and analysis of high-dimensional single-cell cytometry and imaging data.
https://immunedynamics.github.io/spectre/
MIT License
56 stars 21 forks source link

Error installing dependency exactextractr #156

Closed jamesboot closed 1 year ago

jamesboot commented 1 year ago

Hello, I'm having issues with installation - seems to be around the exactextractr dependency, below is the error messages I get:

Installing 1 packages: exactextractr

  There is a binary version available but the source version is later:
              binary source needs_compilation
exactextractr  0.8.1  0.9.1              TRUE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel) yes
installing the source package ‘exactextractr’

trying URL 'https://cran.rstudio.com/src/contrib/exactextractr_0.9.1.tar.gz'
Content type 'application/x-gzip' length 630164 bytes (615 KB)
==================================================
downloaded 615 KB

* installing *source* package ‘exactextractr’ ...
** package ‘exactextractr’ successfully unpacked and MD5 sums checked
** using staged installation
configure: exactextractr: 0.9.1
checking for geos-config... no
configure: error: geos-config not found or not executable
ERROR: configuration failed for package ‘exactextractr’
* removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/exactextractr’

The downloaded source packages are in
    ‘/private/var/folders/kb/43q118t50tn_nf4ctrlp3t240000gn/T/RtmpiwaKBq/downloaded_packages’
── R CMD build ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✔  checking for file ‘/private/var/folders/kb/43q118t50tn_nf4ctrlp3t240000gn/T/RtmpiwaKBq/remotes42076e1a7b0d/ImmuneDynamics-Spectre-3d0c002/DESCRIPTION’ ...
─  preparing ‘Spectre’: (442ms)
✔  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘Spectre_1.0.0.tar.gz’
   Warning in utils::tar(filepath, pkgname, compression = compression, compression_level = 9L,  :
     storing paths of more than 100 bytes is not portable:
     ‘Spectre/workflows/Spatial - advanced/Spectre advanced spatial/Adv spatial 3 - quantitative analysis.R’

ERROR: dependency ‘exactextractr’ is not available for package ‘Spectre’
* removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Spectre’
Warning messages:
1: In read.dcf(file.path(p, "DESCRIPTION"), c("Package", "Version")) :
  cannot open compressed file '/Library/Frameworks/R.framework/Versions/4.2/Resources/library/spectre/DESCRIPTION', probable reason 'No such file or directory'
2: In i.p(...) :
  installation of package ‘exactextractr’ had non-zero exit status
3: In i.p(...) :
  installation of package ‘/var/folders/kb/43q118t50tn_nf4ctrlp3t240000gn/T//RtmpiwaKBq/file420777e2e481/Spectre_1.0.0.tar.gz’ had non-zero exit status
SamGG commented 1 year ago

Hi, I installed it on Windows, R421, no problem. It depends on other packages. The error messages reports a missing geos-config software on your computer, Apple I guess. Try install.packages("exactextractr") to redo installation outside of Spectre, once you solved the dependency to geos-config. Alternatively, install the binary version that should not depend on external software during compilation. My two cents, a Windows user.

tomashhurst commented 1 year ago

Hi @jamesboot , thanks for reaching out. I'm with @SamGG on this one -- try running install.packages("exactextractr") separately and see if the install works OK, that works on my Mac.

jamesboot commented 1 year ago

Hi Both, thanks for your replies. No luck with the suggestion, code and error below:

> install.packages("exactextractr")

  There is a binary version available but the source version is later:
              binary source needs_compilation
exactextractr  0.8.1  0.9.1              TRUE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel) Yes
installing the source package ‘exactextractr’

trying URL 'https://cran.rstudio.com/src/contrib/exactextractr_0.9.1.tar.gz'
Content type 'application/x-gzip' length 630164 bytes (615 KB)
==================================================
downloaded 615 KB

* installing *source* package ‘exactextractr’ ...
** package ‘exactextractr’ successfully unpacked and MD5 sums checked
** using staged installation
configure: exactextractr: 0.9.1
checking for geos-config... no
configure: error: geos-config not found or not executable
ERROR: configuration failed for package ‘exactextractr’
* removing ‘/Library/Frameworks/R.framework/Versions/4.2/Resources/library/exactextractr’
Warning in install.packages :
  installation of package ‘exactextractr’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/kb/43q118t50tn_nf4ctrlp3t240000gn/T/RtmpsDdXJW/downloaded_packages’

Session info:

R version 4.2.3 (2023-03-15)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.6

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

loaded via a namespace (and not attached):
[1] BiocManager_1.30.20 compiler_4.2.3      tools_4.2.3     
SamGG commented 1 year ago

Did you try to select the binary version, ie without compilation? It sounds much easier.

ghar1821 commented 1 year ago

Definitely try installing the binary version. The non binary version is often a headache to compile and install, and hardly worth the extra time/effort.

jamesboot commented 1 year ago

That did the trick! Thanks all