Support

Configuring Python with RStudio Server Pro and RStudio Connect

Follow

Overview

You can use Python with RStudio Server Pro to develop R applications that call Python code using the reticulate package. You can use Python with RStudio Connect to publish Jupyter Notebooks as well as R applications that call Python code.

The best approach for using Python with RStudio Server Pro and RStudio Connect is to install one or more versions of Python on the server that are independent of the system-managed version of Python.

Configuring Python with RStudio Server Pro

For RStudio Server Pro, an administration can install one or more versions of Python on the server using the following steps. Then, each user can create a virtual environment with Python to perform development work.

  1. Install one or more versions of Python following the steps here, including pip and virtualenv: Installing Python
  2. Each user can create a virtualenv in their project directory, install packages in their virtual environment and configure the RETICULATE_PYTHON environment variable following the Best Practices for using Python with RStudio Connect.

Configuring Python with RStudio Connect

Refer to the documentation at https://docs.rstudio.com/rsc/integration/python/ to install and configure Python with RStudio Connect.

RStudio Connect uses a service account (default rstudio-connect) to automatically create virtual environments in Python for each application at deployment time. As a result, it is not typically necessary to manually install Python packages or create virtual environments on the RStudio Connect server.

Comments