Skip to content

fails to compare version on linux blocking initialize and install #375

Open
@latot

Description

@latot
  • rgee version: Git
  • R version: 4.4.2
  • Operating System: Ubuntu Noble

Hi, I was trying to initialize the project normally but I got:

rgee::ee_install(py_env="rgee")
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Python configuration used to create rgee ──
python:         /home/cit_16/.local/share/r-miniconda/envs/r-reticulate/bin/python
libpython:      /home/cit_16/.local/share/r-miniconda/envs/r-reticulate/lib/libpython3.10.so
pythonhome:     /home/cit_16/.local/share/r-miniconda/envs/r-reticulate:/home/cit_16/.local/share/r-miniconda/envs/r-reticulate
version:        3.10.16 | packaged by conda-forge | (main, Dec  5 2024, 14:16:10) [GCC 13.3.0]
numpy:          /home/cit_16/.local/share/r-miniconda/envs/r-reticulate/lib/python3.10/site-packages/numpy
numpy_version:  2.2.1
ee:             [NOT FOUND]
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 
1. Removing the previous Python Environment (rgee), if it exists ...
rgee not found 


2. Creating a Python Environment (rgee)
Error en value[[3L]](cond): 
  An error occur when ee_install was creating the Python Environment. Run ee_clean_pyenv() and restart the R session, before trying again.
> traceback()
6: stop("An error occur when ee_install was creating the Python Environment. ", 
       "Run ee_clean_pyenv() and restart the R session, before trying again.")
5: value[[3L]](cond)
4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
3: tryCatchList(expr, classes, parentenv, handlers)
2: tryCatch(expr = ee_install_create_pyenv(python_version = python_version, 
       py_env = py_env), error = function(e) stop("An error occur when ee_install was creating the Python Environment. ", 
       "Run ee_clean_pyenv() and restart the R session, before trying again."))
1: rgee::ee_install(py_env = "rgee")

After debug and debug I reached the function ee_check_python, where fails:

py_version <- py_discover_config()[["version"]]
....
  if (utils::compareVersion(py_version, "3.5") == -1) {
...

Fails the utils function with strsplit(a, "[.-]"), because of the type of py_version is not the right type:

> py_version
[1] ‘3.10’
> class(py_version)
[1] "package_version" "numeric_version"
> typeof(py_version)
[1] "list"

The function py_discover_config() should always return a vector of length 1 and be a character.

Thx!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions