fails to compare version on linux blocking initialize and install
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 777
- Forks
- 159
- PR merge metrics
- No merged PRs in 30d
Description
- 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!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating ee_check_python and py_discover_config, then reproduce the ee_install failure on Linux and inspect the value passed to utils::compareVersion. Done means py_discover_config returns a length-one character value so version comparison succeeds during environment creation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, r
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100