R/install_fortls_python_deps.R

Defines functions install_fortls_python_deps

Documented in install_fortls_python_deps

#' Install Python dependencies required by FORTLS
#'
#' @param envname Name of the virtual environment or conda environment.
#' @param method Either "virtualenv", "conda", or "auto".
#' @export
install_fortls_python_deps <- function(envname = "fortls_env", method = "auto") {
  # Install Miniconda if using conda and it's not available
  if (method == "conda") {
    reticulate::install_miniconda()
  }

  reticulate::py_install(
    # packages = c("pandas", "numpy", "jakteristics"),  # Add more as needed
    packages = c("numpy"),  # Add more as needed
    envname = envname,
    method = method,
    pip = TRUE
  )

  message("Python environment and packages for FORTLS successfully installed.")
}

Try the FORTLS package in your browser

Any scripts or data that you put into this service are public.

FORTLS documentation built on Nov. 11, 2025, 5:06 p.m.