Skip to content

uninstall_python_package function uninstalls a specified Python package using the system's Python installation. It checks if Python is installed and accessible, then proceeds to uninstall the package. Finally, uninstall_python_package verifies that the package has been successfully uninstalled.

Usage

uninstall_python_package(package_name, python_path = Sys.which("python3"))

Arguments

package_name

The name of the Python package to uninstall.

python_path

The path to the Python executable. If not provided, it uses the system's default Python path.

Value

Invisibly returns TRUE if the package is successfully uninstalled, otherwise it stops with an error message.

Examples

if (FALSE) { # \dontrun{
uninstall_python_package("numpy")
} # }