proj_py_pkg_installed: Check if a Python Package is Installed

View source: R/setup-project.R

proj_py_pkg_installedR Documentation

Check if a Python Package is Installed

Description

Checks if a specified package, and optionally a specific version, is installed in the active Python environment. The function retrieves a list of installed packages and searches for the specified package.

Usage

proj_py_pkg_installed(pkg, version = NULL)

Arguments

pkg

The name of the package to check.

version

Optional specific version to check for. If provided, checks for the package and the specific version.

Value

Logical indicating whether the specified package (and version) is installed.

Examples

proj_py_pkg_installed("numpy")
proj_py_pkg_installed("pandas", "1.1.5")


kueckelj/confuns documentation built on June 28, 2024, 9:19 a.m.