Skip to contents

Check and install python packages

Usage

check_Python(
  packages,
  envname = NULL,
  conda = "auto",
  force = FALSE,
  pip = TRUE,
  pip_options = character(),
  ...
)

Arguments

packages

A character vector, indicating package names which should be installed or removed. Use ⁠<package>==<version>⁠ to request the installation of a specific version of a package.

envname

The name of a conda environment.

conda

The path to a conda executable. Use "auto" to allow SCP to automatically find an appropriate conda binary.

force

Whether to force package installation. Default is FALSE.

pip

Whether to use pip for package installation. By default, packages are installed from the active conda channels.

pip_options

An optional character vector of additional command line arguments to be passed to pip. Only relevant when pip = TRUE.

...

Other arguments passed to conda_install

Examples

check_Python(packages = c("bbknn", "scanorama"))
if (FALSE) {
check_Python(packages = "scvi-tools==0.20.0", envname = "SCP_env", pip_options = "-i https://pypi.tuna.tsinghua.edu.cn/simple")
}