# hidden chunk
req <- read.delim("requirements.txt"), header=FALSE)[[1]]
req <- paste0("'", req, "'", collapse=", ")
# copy-paste from above
# (100+ fixed dependency versions)
req <- c(
'access==1.1.9', 'affine==2.4.0', 'anndata==0.9.2', 'anndata2ri==1.3.1',
'attrs==23.1.0', 'backports.zoneinfo==0.2.1', 'beautifulsoup4==4.12.2', ...)
install_python(version=ver <- "3.8.18")
virtualenv_create(envname=env <- "OSTA", python=ver, packages=req)
use_virtualenv(env, required=TRUE)
basiliskrequires minimal specifications (e.g.,pip="anndata==1.0.0"), which are prone to breaking due to dependency changes/breaks further up the hierarchy (difference in philosophies in terms of versioning and fixing dependencies?).pip, 2. extract requirements from the command line and write to file, and 3. build env usingreticulaterequirements.txtfile could, in principle, be shipped with an R/Bioconductor package. There might be other (better/cleaner) solutions? I'd be interested in hearing/discussing people's thoughts/ideas on this!basilisk/reticulateare relatively technical and don't focus on specific use-cases (e.g., here, interop withanndataR, call a Python method, continue in R, etc.).