pak
pak copied to clipboard
`Error in remote ... Subprocess is busy or cannot start` within `{renv}` project
Unfortunately I seem to be running into an issue using {pak} within an {renv} project. It's returning the following error:
r$> pak::pkg_install("depmixS4")
Error in remote(function(...) get("pkg_install_make_plan", asNamespace("pak"))(...), :
Subprocess is busy or cannot start
The installation works with {pak} outside the {renv} project, and install.packages() works within the {renv} project.
Here's the output of pak::pak_sitrep() and Sys.info().
r$> pak::pak_sitrep()
* pak version:
- 0.1.2.9001
* Version information:
- pak platform: x86_64-apple-darwin17.0 (current: x86_64-apple-darwin17.0, compatible)
- pak repository: - (local install?)
* Optional packages installed:
- tibble
* Library path:
- /Users/user/Documents/Repos/Data4Action/renv/library/R-4.1/x86_64-apple-darwin17.0
- /private/var/folders/09/rm_8fq2958z_d2f_fp3s3y2w172j91/T/Rtmp4cHOgA/renv-system-library
* Private library is embedded.
r$> Sys.info()
sysname release
"Darwin" "20.6.0"
version nodename
"Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:20 PDT 2021; root:xnu-7195.141.6~3/RELEASE_ARM64_T8101" "callum-work-mbp-13.lan"
machine login
"x86_64" "root"
user effective_user
"user" "user"
I have uninstalled and reinstalled both the developmental version (errors above), and the CRAN version (different error below).
r$> pak::pkg_install("depmixS4")
Error in rethrow_call_with_cleanup(c_processx_wait, private$status, as.integer(timeout), :
attempt to apply non-function
Type .Last.error.trace to see where the error occurred
r$> .Last.error.trace
Stack trace:
1. pak::pkg_install("depmixS4")
2. pak:::remote(function(...) get("pkg_install_make_plan", asNamespace("pak"))(...), ...
3. pak:::restart_remote_if_needed()
4. rs$wait(100)
5. process_wait(self, private, timeout)
6. rethrow_call_with_cleanup(c_processx_wait, private$status, as.integer(timeout), ...
x attempt to apply non-function
We'll have better renv support soonish.
Hello,
I have the same problem with {renv} 1.0.2 and {pak} 0.6, the first time in an R session that I try to install a package. If I run again the same command just after the error in the same session, it works.
Here's the error (I am installing with 'install.packages' and RENV_CONFIG_PAK_ENABLED = TRUE but it's the same with pak::pkg_install) :
install.packages("openxlsx")
#> Error in remote(function(...) get("pkg_install_make_plan", asNamespace("pak"))(...), :
#> Subprocess is busy or cannot start
#> Traceback (most recent calls last):
#> 6: install.packages("openxlsx")
#> 5: install(pkgs)
#> 4: renv_pak_install(packages, libpaths, project)
#> 3: pak$pkg_install(pkg = packages, lib = lib, upgrade = TRUE)
#> 2: remote(function(...) get("pkg_install_make_plan", asNamespace("pak"))(...),
#> list(pkg = pkg, lib = lib, upgrade = upgrade, ask = ask,
#> start = start, dependencies = dependencies, loaded = loaded_packages(lib)))
#> 1: stop("Subprocess is busy or cannot start")
pak::pak_sitrep()
#> * pak version:
#> - 0.6.0
#> * Version information:
#> - pak platform: x86_64-pc-linux-gnu (current: x86_64-pc-linux-gnu, compatible)
#> - pak repository: - (local install?)
#> * Optional packages installed:
#> - pillar
#> * Library path:
#> - /xxx/xxx/xxx/myproject/renv/library/R-4.1/x86_64-pc-linux-gnu
#> - /home/duccio/.cache/R/renv/sandbox/R-4.1/x86_64-pc-linux-gnu/9a444a72
#> * Private library is embedded.
Here are my system's and session's info but it's the same on a Mac.
Sys.info()
#> sysname
#> "Linux"
#> release
#> "6.4.6-76060406-generic"
#> version
#> "#202307241739~1692717645~22.04~5597803 SMP PREEMPT_DYNAMIC Tue A"
#> nodename
#> "pop-os"
#> machine
#> "x86_64"
#> login
#> "user"
#> user
#> "user"
#> effective_user
#> "user"
sessionInfo()
#> R version 4.1.2 (2021-11-01)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: Pop!_OS 22.04 LTS
#>
#> Matrix products: default
#> BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0
#> LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0
#>
#> locale:
#> [1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C
#> [3] LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8
#> [5] LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8
#> [7] LC_PAPER=en_GB.UTF-8 LC_NAME=C
#> [9] LC_ADDRESS=C LC_TELEPHONE=C
#> [11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> loaded via a namespace (and not attached):
#> [1] digest_0.6.33 withr_2.5.0 R.methodsS3_1.8.2 lifecycle_1.0.3
#> [5] magrittr_2.0.3 reprex_2.0.2 evaluate_0.21 rlang_1.1.1
#> [9] cli_3.6.1 fs_1.6.3 R.utils_2.12.2 R.oo_1.25.0
#> [13] vctrs_0.6.3 rmarkdown_2.24 styler_1.10.2 tools_4.1.2
#> [17] R.cache_0.16.0 glue_1.6.2 purrr_1.0.2 xfun_0.40
#> [21] yaml_2.3.7 fastmap_1.1.1 compiler_4.1.2 htmltools_0.5.6
#> [25] knitr_1.43```
Yes, this is a known issue: https://github.com/rstudio/renv/issues/1628
ah, sorry, I didn't find that. Thank you
So this is now fixed in dev pak. Linux binaries will be available within an hour, the rest tomorrow.
OTOH,
- I am not sure how to tell renv to use dev pak, and
- https://github.com/rstudio/renv/issues/1678 means that it is not great to use pak for renv projects, with P3M.