Learn R Programming

BERTopic (version 0.1.0)

install_py_deps_conda: Install Python dependencies for BERTopic (Conda route)

Description

Creates (or reuses) a Conda environment with a pinned Python toolchain, installs the scientific stack + PyTorch (CPU) + sentence-transformers, then installs bertopic==0.16.0 via pip. Optionally validates imports.

Usage

install_py_deps_conda(
  envname = "r-bertopic",
  python_version = "3.10",
  reinstall = FALSE,
  validate = TRUE,
  verbose = TRUE
)

Value

Invisibly returns the path to the Python executable inside the env.

Arguments

envname

Character. Conda environment name. Default "r-bertopic".

python_version

Character. Python version to use, e.g. "3.10".

reinstall

Logical. If TRUE, delete any existing env and recreate.

validate

Logical. If TRUE, bind and validate imports (will skip if reticulate is already initialized to another Python).

verbose

Logical. Print progress messages.

Examples

Run this code
if (FALSE) {
install_py_deps_conda(envname = "r-bertopic", python_version = "3.10")
}

Run the code above in your browser using DataLab