install_python_package_with_version: Install a Python package with a certain version

View source: R/install_python_package_with_version.R

install_python_package_with_versionR Documentation

Install a Python package with a certain version

Description

Install a Python package with a certain version

Usage

install_python_package_with_version(
  package_name,
  package_version,
  ormr_folder_name = get_default_ormr_folder_name(),
  python_version = get_default_python_version(),
  verbose = FALSE
)

Arguments

package_name

the name of one Python package

package_version

a Python package's version, e.g. ==3.1, or <=2.7.1 or >=42

ormr_folder_name

can be either python3 or the name of the folder where ormr installs all Python environments and packages.

python_version

the version of Python used. Use get_default_python_version to get the default Python version.

verbose

the verbosity of a function. Set to TRUE for more output. Use check_verbose to detect if this argument is valid.

Value

nothing

Author(s)

Richèl J.C. Bilderbeek

Examples

if (plinkr::is_on_ci()) {

  # Use local python
  install_python_package_with_version(
    package_name = "scipy",
    package_version = "1.5.3",
    ormr_folder_name = "python3"
  )

  # Use conda
  if (is_conda_installed()) {
    install_python_package_with_version(
      package_name = "scipy",
      package_version = "1.5.3"
    )
  }
}

richelbilderbeek/ormr documentation built on May 23, 2022, 1:15 p.m.