Learn R Programming

renv (version 0.3.0-40)

use_python: Use Python

Description

Associate a version of Python with your project. When active, renv will take care of capturing your Python dependencies when renv::snapshot() is called, and installing your Python dependencies when renv::restore() is called.

Usage

use_python(python = NULL, type = "virtualenv", name = NULL, ...,
  project = NULL)

Arguments

python

The path to a Python binary. This can be the path to a Python binary on the system, or the path to a Python binary within an already-existing Python environment. If NULL, the RETICULATE_PYTHON environment variable is checked; if that is not set, then the default version of Python on the PATH is used instead.

type

The type of Python environment to use. By default, a project-local virtual environment will be created with the requested version of Python, as supplied by python. Ignored if the requested version of python lives within a pre-existing Python environment.

name

When type is "virtualenv" or "conda", this argument can be used to supply the name or path that should be used for the associated Python environment. Ignored if the requested version of python lives within a pre-existing Python environment.

...

Optional arguments; currently unused.

project

The project directory. If NULL, then the active project will be used. If no project has been specifically activated, the current working directory is used.