Complete Development Setup Guide for R & Python

R
Python
VS Code
Setup
Tutorial
A comprehensive guide to setting up R, Python, and VS Code for modern data science development workflows.
Author

Antoine Lucas

Published

October 15, 2024

Introduction

If you work across R and Python, the hard part is rarely installing the languages themselves. The hard part is ending up with a setup that is pleasant to use, consistent across projects, and close enough to modern practice that you do not have to relearn your tooling six months later.

This guide is the setup I would recommend for a data scientist or applied statistician starting from a reasonably clean machine. It is opinionated on purpose: VS Code as the editor, Quarto for reporting, and a small set of formatting and dependency tools that remove avoidable friction.

1. Install the language runtimes

R

The cleanest way to manage R today is rig, the R installation manager. It lets you install multiple R versions, switch defaults cleanly, and avoid the usual “which R is this project using?” confusion.

Typical workflow:

  1. Install rig.
  2. Add the R versions you actually need.
  3. Set a sensible default for interactive work.

If you do not want another tool, the fallback is the standard installer from CRAN. That is still perfectly fine. rig is mainly about making future version changes painless.

Python

For Python itself, the standard installer from python.org or your operating system package manager is enough to get started. What matters more is how you manage project environments afterward.

My recommendation is:

  1. Install Python 3.11 or newer.
  2. Add uv for project environments and dependency management.
  3. Optionally add pipx if you like installing standalone Python CLI tools outside project environments.

uv has become the easiest way to create isolated environments, pin dependencies, and run project commands without the usual mix of venv, pip, and ad hoc shell glue.

2. Install the editor

My default recommendation is VS Code. It is not the only option, but it is the best fit if you move between R, Python, Quarto, shell work, and lightweight infrastructure tasks in the same week.

You can absolutely work in RStudio, Positron, or PyCharm. This guide stays with VS Code because the multi-language story is stronger and the extension ecosystem is better for mixed R and Python projects.

Install these extensions first:

Optional but useful additions:

3. Install reporting and authoring tools

For reports, notebooks that should survive code review, and anything that becomes a deliverable, install Quarto.

Quarto matters because it gives you one format for narrative text, code, figures, and final output. It is a better default than a pile of one-off notebooks if the work needs to be reproducible or handed over.

If you like notebooks for exploratory Python work, I would evaluate marimo before defaulting to Jupyter. It stores notebooks as Python files, which makes version control much less painful.

4. Configure formatting and linting

Formatting and linting are the difference between an environment that stays readable and one that gradually turns into a mess.

For R:

  • use air as the formatter
  • consider lintr or jarl for linting, depending on how strict you want the workflow to be

For Python:

  • use Ruff for formatting and linting
  • rely on project-local environments managed by uv

For both languages:

  • keep Error Lens enabled so problems stay visible while you edit

5. Validate the setup

Once the tools are installed, check that the machine can do the basic tasks you care about.

Typical validation commands:

R --version
python --version
uv --version
quarto --version
code --list-extensions

Then create a small test project:

  1. Create a Quarto document.
  2. Render it successfully.
  3. Create a Python environment with uv.
  4. Open an R script and confirm the VS Code extension sees your R installation.

If those four things work, the setup is already good enough for most data work.

6. What I would use in practice

If you want the short version, this is the stack I would actually put on a new machine:

  • rig for R versions
  • Python 3.11+ plus uv
  • VS Code with the R, Python, Quarto, and Error Lens extensions
  • Quarto for reports and deliverables
  • air for R formatting
  • Ruff for Python formatting and linting

That setup is not the only valid one. It is just a combination that scales well from personal projects to more serious collaborative work.

Further resources

Back to top