diff --git a/R/causact-package.R b/R/causact-package.R index 0894a33..c5a5b14 100644 --- a/R/causact-package.R +++ b/R/causact-package.R @@ -44,7 +44,7 @@ # Above code for if successful , continue }, error = function(e) {# Display an error message packageStartupMessage("An error occurred:", conditionMessage(e)) - packageStartupMessage(". To make causact's required connection to Python, restart R, then load the causact package with library(causact).\n") + packageStartupMessage(". To make causact's required connection to Python, restart R, then install causact's dependencies with causact::install_causact_deps().\n") }) } # end else } #end .onAttach function diff --git a/R/install_causact_deps.R b/R/install_causact_deps.R index 4b4ab9d..b98dc7d 100644 --- a/R/install_causact_deps.R +++ b/R/install_causact_deps.R @@ -37,7 +37,8 @@ install_causact_deps <- ## guaranteed to work together with python 3.11 packages = c("numpyro[cpu]==0.13.2", "arviz==0.16.1", - "pandas==2.1.3") + "pandas==2.1.3", + "scipy==1.12") python_version = "3.11" pip = TRUE new_env = TRUE @@ -90,6 +91,9 @@ install_causact_deps <- reticulate::install_miniconda() }) + #start fresh + try(reticulate::conda_remove(envname)) + reticulate::py_install( packages = packages, envname = envname,