Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in vapply(python_versions, get_platform, ""): values must be length 1 #1674

Closed
jooyoungseo opened this issue Sep 22, 2024 · 1 comment · Fixed by #1675
Closed

Error in vapply(python_versions, get_platform, ""): values must be length 1 #1674

jooyoungseo opened this issue Sep 22, 2024 · 1 comment · Fixed by #1675

Comments

@jooyoungseo
Copy link

Python v3.12.6 is installed system-wide, but it is not discoverable enven though it was added to path.

Reprex

# Check Python path
Sys.which("python")
#>                               python 
#> "C:\\PROGRA~1\\PYTHON~1\\python.exe"

# Print Python version
system("python --version")
#> [1] 0

# Discover Py config
reticulate::py_discover_config()
#> Error in vapply(python_versions, get_platform, ""): values must be length 1,
#>  but FUN(X[[1]]) result is length 5

Created on 2024-09-22 with reprex v2.1.1

Session info

sessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#>  setting  value
#>  version  R version 4.4.1 (2024-06-14 ucrt)
#>  os       Windows 11 x64 (build 22631)
#>  system   x86_64, mingw32
#>  ui       RTerm
#>  language (EN)
#>  collate  English_United States.utf8
#>  ctype    English_United States.utf8
#>  tz       America/Chicago
#>  date     2024-09-22
#>  pandoc   3.4 @ C:/PROGRA~1/Pandoc/ (via rmarkdown)
#> 
#> ─ Packages ───────────────────────────────────────────────────────────────────
#>  package     * version     date (UTC) lib source
#>  cli           3.6.3       2024-06-21 [1] CRAN (R 4.4.1)
#>  digest        0.6.37      2024-08-19 [1] CRAN (R 4.4.1)
#>  evaluate      1.0.0       2024-09-17 [1] CRAN (R 4.4.1)
#>  fastmap       1.2.0       2024-05-15 [1] CRAN (R 4.4.0)
#>  fs            1.6.4       2024-04-25 [1] CRAN (R 4.4.0)
#>  glue          1.7.0       2024-01-09 [1] CRAN (R 4.4.0)
#>  here          1.0.1       2020-12-13 [1] CRAN (R 4.4.0)
#>  htmltools     0.5.8.1     2024-04-04 [1] CRAN (R 4.4.0)
#>  jsonlite      1.8.9       2024-09-20 [1] CRAN (R 4.4.1)
#>  knitr         1.48        2024-07-07 [1] CRAN (R 4.4.1)
#>  lattice       0.22-6      2024-03-20 [1] CRAN (R 4.4.1)
#>  lifecycle     1.0.4       2023-11-07 [1] CRAN (R 4.4.0)
#>  Matrix        1.7-0       2024-04-26 [1] CRAN (R 4.4.1)
#>  png           0.1-8       2022-11-29 [1] CRAN (R 4.4.0)
#>  rappdirs      0.3.3       2021-01-31 [1] CRAN (R 4.4.0)
#>  Rcpp          1.0.13      2024-07-17 [1] CRAN (R 4.4.1)
#>  reprex        2.1.1       2024-07-06 [1] CRAN (R 4.4.1)
#>  reticulate    1.39.0.9000 2024-09-22 [1] Github (rstudio/reticulate@8a38c9a)
#>  rlang         1.1.4       2024-06-04 [1] CRAN (R 4.4.0)
#>  rmarkdown     2.28        2024-08-17 [1] CRAN (R 4.4.1)
#>  rprojroot     2.0.4       2023-11-05 [1] CRAN (R 4.4.0)
#>  sessioninfo   1.2.2       2021-12-06 [1] CRAN (R 4.4.0)
#>  withr         3.0.1       2024-07-31 [1] CRAN (R 4.4.1)
#>  xfun          0.47        2024-08-17 [1] CRAN (R 4.4.1)
#>  yaml          2.3.10      2024-07-26 [1] CRAN (R 4.4.1)
#> 
#>  [1] C:/Program Files/R/R-4.4.1/library
#> 
#> ──────────────────────────────────────────────────────────────────────────────
t-kalinowski added a commit that referenced this issue Sep 23, 2024
closes:#1674

return from `system2()` can be
a length!=1 character
@t-kalinowski
Copy link
Member

Thank you very much for the bug report! This should be fixed in the development version now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants