Giter Site home page Giter Site logo

Comments (5)

thomasyu888 avatar thomasyu888 commented on June 3, 2024

HI @pvo93 ,

Thanks for using synapser. Can you try doing this:

require(reticulate)
reticulate::use_python("/usr/local/biotools/python/3.10.7/bin/python")
install.packages("synapser", repos = c("http://ran.synapse.org/", "http://cran.fhcrc.org/"))

from synapser.

pvo93 avatar pvo93 commented on June 3, 2024

It still seems to be looking for Python 2.7 libraries.

require(reticulate)
Loading required package: reticulate
install.packages("synapser", repos = c("http://ran.synapse.org/", "http://cran.fhcrc.org/"))
Installing package into ‘/usr/local/biotools/rpackages/R-4.2.2-2023-02-01’
(as ‘lib’ is unspecified)
trying URL 'http://ran.synapse.org/src/contrib/synapser_1.2.0.143.tar.gz'
Content type 'application/x-tar' length 156600 bytes (152 KB)
==================================================
downloaded 152 KB

  • installing source package ‘synapser’ ...
    ** using staged installation
    Error: PyType_GetFlags - /usr/lib64/libpython2.7.so.1.0: undefined symbol: PyType_GetFlags
    In addition: Warning message:
    In py_initialize(config$python, config$libpython, config$pythonhome, :
    Python 2 reached EOL on January 1, 2020. Python 2 compatability will be removed in an upcoming reticulate release.
    Execution halted
    [1] "*** Using Python Configuration:"
    virtualenv: r-reticulate
    Using virtual environment '/home/mayo/wa02042/.virtualenvs/r-reticulate' ...
  • /home/mayo/wa02042/.virtualenvs/r-reticulate/bin/python -m pip install --upgrade --no-user 'requests<3' 'pandas~=2.0.0' pysftp jinja2 markupsafe
    DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
    Collecting requests<3
    Using cached requests-2.27.1-py2.py3-none-any.whl (63 kB)
    ERROR: Could not find a version that satisfies the requirement pandas~=2.0.0 (from versions: 0.1, 0.2, 0.3.0, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.5.0, 0.6.0, 0.6.1, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.8.0, 0.8.1, 0.9.0, 0.9.1, 0.10.0, 0.10.1, 0.11.0, 0.12.0, 0.13.0, 0.13.1, 0.14.0, 0.14.1, 0.15.0, 0.15.1, 0.15.2, 0.16.0, 0.16.1, 0.16.2, 0.17.0, 0.17.1, 0.18.0, 0.18.1, 0.19.0, 0.19.1, 0.19.2, 0.20.0, 0.20.1, 0.20.2, 0.20.3, 0.21.0, 0.21.1, 0.22.0, 0.23.0, 0.23.1, 0.23.2, 0.23.3, 0.23.4, 0.24.0, 0.24.1, 0.24.2)
    ERROR: No matching distribution found for pandas~=2.0.0
    Error: Error installing package(s): "'requests<3'", "'pandas~=2.0.0'", "pysftp", "jinja2", "markupsafe"
    Execution halted
    ERROR: configuration failed for package ‘synapser’
  • removing ‘/usr/local/biotools/rpackages/R-4.2.2-2023-02-01/synapser’
  • restoring previous ‘/usr/local/biotools/rpackages/R-4.2.2-2023-02-01/synapser’

The downloaded source packages are in
‘/tmp/RtmpE09Aui/downloaded_packages’
Warning message:
In install.packages("synapser", repos = c("http://ran.synapse.org/", :
installation of package ‘synapser’ had non-zero exit status

from synapser.

thomasyu888 avatar thomasyu888 commented on June 3, 2024

HI @pvo93

Did you run this command before installing?

reticulate::use_python("/usr/local/biotools/python/3.10.7/bin/python")

from synapser.

pvo93 avatar pvo93 commented on June 3, 2024

Yes, I did. I ran it a second time after deleting ~/.virtualenvs/r-reticulate and forgot to include that line to paste in the output, but I had run it earlier in the session. My apologies. I just ran it again in a new session.

require(reticulate)
Loading required package: reticulate
reticulate::use_python("/usr/local/biotools/python/3.10.7/bin/python")
install.packages("synapser", repos = c("http://ran.synapse.org/", "http://cran.fhcrc.org/"))
Installing package into ‘/usr/local/biotools/rpackages/R-4.2.2-2023-02-01’
(as ‘lib’ is unspecified)
trying URL 'http://ran.synapse.org/src/contrib/synapser_1.2.0.143.tar.gz'
Content type 'application/x-tar' length 156600 bytes (152 KB)
==================================================
downloaded 152 KB

  • installing source package ‘synapser’ ...
    ** using staged installation
    Error: PyType_GetFlags - /usr/lib64/libpython2.7.so.1.0: undefined symbol: PyType_GetFlags
    In addition: Warning message:
    In py_initialize(config$python, config$libpython, config$pythonhome, :
    Python 2 reached EOL on January 1, 2020. Python 2 compatability will be removed in an upcoming reticulate release.
    Execution halted
    [1] "*** Using Python Configuration:"
    virtualenv: r-reticulate
    Using virtual environment '/home/mayo/wa02042/.virtualenvs/r-reticulate' ...
  • /home/mayo/wa02042/.virtualenvs/r-reticulate/bin/python -m pip install --upgrade --no-user 'requests<3' 'pandas~=2.0.0' pysftp jinja2 markupsafe
    DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
    Collecting requests<3
    Using cached requests-2.27.1-py2.py3-none-any.whl (63 kB)
    ERROR: Could not find a version that satisfies the requirement pandas~=2.0.0 (from versions: 0.1, 0.2, 0.3.0, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.5.0, 0.6.0, 0.6.1, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.8.0, 0.8.1, 0.9.0, 0.9.1, 0.10.0, 0.10.1, 0.11.0, 0.12.0, 0.13.0, 0.13.1, 0.14.0, 0.14.1, 0.15.0, 0.15.1, 0.15.2, 0.16.0, 0.16.1, 0.16.2, 0.17.0, 0.17.1, 0.18.0, 0.18.1, 0.19.0, 0.19.1, 0.19.2, 0.20.0, 0.20.1, 0.20.2, 0.20.3, 0.21.0, 0.21.1, 0.22.0, 0.23.0, 0.23.1, 0.23.2, 0.23.3, 0.23.4, 0.24.0, 0.24.1, 0.24.2)
    ERROR: No matching distribution found for pandas~=2.0.0
    Error: Error installing package(s): "'requests<3'", "'pandas~=2.0.0'", "pysftp", "jinja2", "markupsafe"
    Execution halted
    ERROR: configuration failed for package ‘synapser’
  • removing ‘/usr/local/biotools/rpackages/R-4.2.2-2023-02-01/synapser’
  • restoring previous ‘/usr/local/biotools/rpackages/R-4.2.2-2023-02-01/synapser’

The downloaded source packages are in
‘/tmp/RtmpJvldw0/downloaded_packages’
Warning message:
In install.packages("synapser", repos = c("http://ran.synapse.org/", :
installation of package ‘synapser’ had non-zero exit status

from synapser.

thomasyu888 avatar thomasyu888 commented on June 3, 2024

Hi @pvo93 ,

Apologies for the delays in response - I have found the bug and am attempting to fix it for the upcoming release. In the meantime, a not as ideal way to interact with the client in R can be found here: https://github.com/Sage-Bionetworks/synapsePythonClient/blob/develop/docs/articles/reticulate.rst.

You would use reticulate directly to install the client:

require(reticulate)
reticulate::use_python("/usr/local/biotools/python/3.10.7/bin/python")
reticulate::py_install("synapseclient")

The rest of the instructions can be found in the link above. Please let me know if that doesn't work while I attempt to fix the issue.

from synapser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.