The March 2022 RStudio Connect release removes support for Python 2 and updates the minimum version supported to Python 3.5.
Python 2.7 has reached end of life (EOL) maintenance status. On January 1, 2020, the Python language governing body ended support for this version, and they are no longer providing security patches. RStudio Connect continued to support Python 2.7 beyond its EOL status announcement, but several factors have influenced our decision to end support:
pip21.0 release officially dropped support for Python 2.
The March 2022 release of RStudio Connect introduces a breaking change for installations and content that use a Python version below 3.5.
Connect Administrators need to remove older versions of Python from the Connect installation. Publishers need to update their deployed content to use Python version 3.5 or higher.
In order to upgrade RStudio Connect, verify that your configuration file does not include Python 2 or Python 3 versions prior to 3.5. If it does, and you do not remove those configuration settings, the Connect service will throw an error during start-up. This is a breaking change.
The configuration file should only contain Python 3 versions that meet the minimum requirements (Example):
; /etc/rstudio-connect/rstudio-connect.gcfg [Python] Enabled = true Executable = /shared/Python/3.7.6/bin/python3 Executable = /shared/Python/3.8.1/bin/python3
In addition to the new minimum version requirements, Python installations no longer require the
virtualenv package to be installed. Python content will now use the
venv module included with Python 3.
Note: RStudio Workbench does not document minimum version requirements for Python, but you may want to schedule time to check or update the versions available there as well to avoid publishing errors due to environment mismatches.
Content owners need to update their code to use Python version 3.5 or higher. Content can be re-published to the same location, preserving existing settings like custom URLs, environment variables, access permissions, or runtime settings.
If published apps or APIs using an older version of Python are not updated, they will fail to run. Static R Markdown reports and Jupyter Notebooks using an older version of Python can still be viewed, but they will fail to re-render. Scheduled reports will send error message emails.
Conduct a Python runtime audit of your server and the deployed content. This video overview provides tips for auditing Python usage on RStudio Connect depending on the level of detail you need.
/opt/rstudio-connect/scripts/find-python-envswhich will list all Python virtual environments and the applications that use them.
Before upgrading, please review the full release notes.
Upgrading RStudio Connect typically requires less than five minutes. This release contains a breaking change which may require an update to the Connect configuration file.
rstudio-connect service will fail to start if the configuration file includes Python 2 or Python 3 versions prior to 3.5. Edit the configuration to remove any
Python.Executable properties that do not meet the new minimum version requirements.
If you are upgrading from a version earlier than the February 2022 edition, be sure to consult the release notes for the intermediate releases, as well:
To perform an RStudio Connect upgrade, download and run the installation script. The script installs a new version of Connect on top of the earlier one. Existing configuration settings are respected.
# Download the installation script curl -Lo rsc-installer.sh https://cdn.rstudio.com/connect/installer/installer-v1.10.0.sh # Run the installation script sudo -E bash ./rsc-installer.sh 2022.03.2
We are excited to announce real-time collaborative editing on RStudio Cloud. Users can join the same project, edit code, and immediately see each other’s changes.
The RStudio IDE includes a visual markdown editor that displays changes in real-time and provides support for technical writing. This post walks through several features of visual editing mode.