Sage-Bionetworks / synapser

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

Installation issue #335

Closed akaat closed 1 week ago

akaat commented 1 month ago

Operating system

Windows 10 Enterprise

Description of the problem

I am unable to install synapser. I have python 3.12 already installed and the required python libraries in the terminal, but when calling install.packages("synapser", repos=c("http://ran.synapse.org", "http://cran.fhcrc.org")) it tries to install everything all over again and then errors out because some of the libraries (which are already installed) do not register.

Expected behavior

I expected a successful install.

Actual behavior

A lot of installation information is printed to the console, but the ending is probably most relevant. This is what I see:

 note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pandas
Failed to build pandas
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pandas)

[notice] A new release of pip is available: 24.1.1 -> 24.1.2
[notice] To update, run: python.exe -m pip install --upgrade pip
Error: Error installing package(s): "\"requests<3\"", "\"pandas~=2.0.0\"", "pysftp", "jinja2", "markupsafe"
Execution halted
ERROR: configuration failed for package 'synapser'
* removing 'C:/Users/ajk128/AppData/Local/Programs/R/R-4.4.1/library/synapser'
Warning in install.packages :
  installation of package ‘synapser’ had non-zero exit status

Please note that all of the packages listed in the "Error" section are installed in python, and even though it says a new release of pip is available, I am running that release. So it appears that it is failing to find my python installation and working to do it on its own.

Output of sessionInfo()

R version 4.4.1 (2024-06-14 ucrt) Platform: x86_64-w64-mingw32/x64 Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale: [1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8
[3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8

time zone: America/Chicago tzcode source: internal

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

loaded via a namespace (and not attached): [1] compiler_4.4.1 tools_4.4.1

danlu1 commented 1 month ago

@akaat Thanks for reaching out. Could you please try to install synapser with python 3.11? Currently, python 3.12 is not supported yet.

akaat commented 1 month ago

Thanks @danlu1 - I installed 3.11 and things didn't change, so I uninstalled 3.12 and manually added 3.11 to my path. Now I have a lot less information printed to the console, but I get two different error messages, one at the beginning:

Warning in install.packages : unable to access index for repository http://ran.synapse.org/bin/windows/contrib/4.4: cannot open URL 'http://ran.synapse.org/bin/windows/contrib/4.4/PACKAGES'

And this one at the end:

NOTE: Python version was forced by Windows Registry Using virtual environment "~/.virtualenvs/r-reticulate" ... Error: invalid version specification ''

Any other ideas?

danlu1 commented 1 month ago

@akaat Sorry I should have noticed but our suspicion is that the error might be related to the R version. Currently, R version 4.4.1 is not supported yet. I will test on my end and get back to yo ASAP.

akaat commented 1 month ago

Ahh, that's an easy enough fix. I reverted my R version back to 4.3.3 for this session and it installed no problem. Thanks

danlu1 commented 1 month ago

Glad it works @akaat

thomasyu888 commented 1 week ago

The new synapser version is now out and it does support R 4.4.1. Just wanted to let you know @akaat , but going to close this request. Thanks for filing this ticket!