diff --git a/R-package/R/zzz.R b/R-package/R/zzz.R index 709bee19..7a00b2de 100644 --- a/R-package/R/zzz.R +++ b/R-package/R/zzz.R @@ -1,12 +1,5 @@ # global reference to packages (will be initialized in .onLoad) -# numpy <- NULL -# scipy <- NULL -# six <- NULL -# sklearn <- NULL -# tqdm <- NULL -# ns <- NULL -# rpy2 <- NULL joblib <- NULL numpy <- NULL pandas <- NULL @@ -16,34 +9,8 @@ threadpoolctl <- NULL tqdm <- NULL ns <- NULL -# install_miniconda_ <- function(silent = TRUE) -# { -# try(reticulate::install_miniconda(), -# silent = silent) -# } - -# uninstall_nnetsauce <- function(foo = NULL) { -# python <- reticulate:::.globals$py_config$python -# packages <- "nnetsauce" -# args <- c("pip", "uninstall", "--yes", packages) -# result <- system2(python, args) -# if (result != 0L) { -# pkglist <- paste(shQuote(packages), collapse = ", ") -# msg <- paste("Error removing package(s):", pkglist) -# stop(msg, call. = FALSE) -# } -# packages -# } - - install_packages <- function(pip=TRUE) { - # reticulate::py_install("numpy", pip = pip) - # reticulate::py_install("rpy2", pip = pip) - # reticulate::py_install("scipy", pip = pip) - # reticulate::py_install("six", pip = pip) - # reticulate::py_install("tqdm", pip = pip) - # reticulate::py_install("sklearn", pip = pip) reticulate::py_install("joblib", pip = pip) reticulate::py_install("numpy", pip = pip) reticulate::py_install("pandas", pip = pip) @@ -66,11 +33,6 @@ install_packages <- function(pip=TRUE) { .onLoad <- function(libname, pkgname) { - # try(do.call("uninstall_nnetsauce", list(foo=NULL)), - # silent = TRUE) - # - # do.call("install_miniconda_", list(silent=TRUE)) - do.call("install_packages", list(pip=TRUE)) joblib <<- reticulate::import("joblib", delay_load = TRUE)