Lab 2 – Install system dependencies, Python, Quarto
For this second part of the Connect installation you will:
- install system dependencies for R packages
- install Python and Quarto
- Reading time: 10 minutes
- Documentation reading time: 20-30 minutes
- Hands-on exercise time: 15-30 minutes
1. Installation of Additional Dependencies
Many R packages rely on system dependencies to work. Without them, users will not be able to install R packages needed to deploy content to Connect.
Follow the instructions on the Posit Connect Admin guide to install the system dependencies recommended by Posit (use the “Ubuntu 24.04” tab).
Note that depending on the R packages your developers rely on, you may have to install additional dependencies. The package pages on the Public Posit Package Repository provide information on the system dependencies required by each package (the dependencies listed are the needed even if you don’t use Posit Package Manager as a repository).
In June 2025, Posit has announced a preview of “Portable R Binary Packages”. With this initiative, system dependencies required by some R packages are directly bundled with the packages, meaning that as an Admin, you won’t have to install these dependencies by hand.
2. Installation of Python
Posit Connect allows different content deployed to depend on different versions of Python. Those deployments can coexist within your Connect instance without conflict. However, for this reason, we do not recommend installing Python using your linux distribution’s package manager. Instead, we recommend using uv to install multiple versions of Python.
Review the Python Overview section in the Admin Guide.
Using the Python installation guide, complete the following steps:
- install
uv - install Python 3.13.10
- install Python 3.14.1
## Install uv (only needed once)
curl -LsSf https://astral.sh/uv/install.sh | sudo env UV_INSTALL_DIR=/usr/local/bin sh
## Configure the Python version you want to install (repeat this step and the steps below for each version you want to install)
export PYTHON_VERSION="3.13.10"
## Install the specified Python version
sudo /usr/local/bin/uv python install "${PYTHON_VERSION}" --install-dir=/opt/python
sudo ln -s /opt/python/cpython-$PYTHON_VERSION-* /opt/python/$PYTHON_VERSION
## Verify the installation
/opt/python/"${PYTHON_VERSION}"/bin/python --version/root/.local/bin not being in your $PATH
When installing different versions of Python using uv, a warning message will be displayed:
warning: `/root/.local/bin` is not on your PATH. To use installed Python executables, run `export PATH="/root/.local/bin:$PATH"` or `uv python update-shell`
This warning can be safely ignored in the context of a Posit Connect installation. By default, uv creates links in /root/.local/bin to the Python executables installed (in /opt/python/ in our case). This is useful if you want to call Python directly from the command line. However, Posit Connect uses the paths specified in its configuration file to find the Python executables, so having /root/.local/bin in your $PATH is not necessary. You can disable the creation of these links, and the associated warning by adding the --no-bin flag to the installation command.
The latest version of Python should be checked against the Python.org to make sure you are providing your users the latest version of Python that isn’t in pre-release status. Always install the latest patch version of these major.minor versions. The latest patch version generally includes the most bugfixes and security patches.
After you completed the installation of these Python versions, do not forget to edit Connect’s configuration file to enable both Python versions.
3. Installation of Quarto
Review the Quarto Overview section in the Admin Guide.
Using the Quarto Installation Guide, install the latest version of Quarto.
To identify Quarto’s latest version, you can visit the Get Started page on the Quarto website, which lists download links for the different platforms and includes the version number. Alternatively, you can find all releases (including pre-releases) on GitHub.
Edit your Connect’s configuration file to enable Quarto.
4. Final checks
Restart your Posit Connect instance:
sudo systemctl restart rstudio-connectand inspect the logs to ensure that Posit Connect has detected your Python and Quarto installations.
sudo less /var/log/rstudio/rstudio-connect/rstudio-connect.logCheck that Posit Connect is running correctly by visiting the tab “Posit Connect” next to your Shell tab. You are now ready to click the “Check” button to verify that you completed all the steps for this lab.
Check Your Understanding
Test your knowledge of the installation process by answering these questions:
Why does Posit not recommend installing R, Python, or Quarto using your Linux distribution’s package manager for Connect deployments? What is the recommended approach instead?
After installing a new version of R, Python, or Quarto, what two key steps must you complete to ensure that they work correctly with Connect?
Posit does not recommend using the Linux distribution’s package manager to install R, Python, and Quarto. Connect allows different content to depend on different versions of these software. These deployments need to co-exist without conflict. By using the installers that Posit provides (for R and Quarto) and installing Python with
uv, you can have multiple versions of R and Python on your system. Additionally, distribution package managers may not provide the specific versions needed or may automatically update to incompatible versions.After installing a new version of R, Python, or Quarto, you need to:
- edit Connect’s configuration file to add the paths of the executables
- restart Connect
Additionally, you may want to check the Connect logs to ensure that these new versions were detected.
Looking back, Planning Ahead
Based on what you have learned during this lab so far (labs 1 and 2), what are the questions you want to ask to make sure that Posit Connect is configured in a way that works for your users?
- Server/VM size
- On-prem vs cloud infrastructure
- Linux operating system
- R version(s)
- Python version(s)
- Quarto version(s)
- Security approvals