How-To: Rstudio: Launch Rstudio in Conda Environment From Command Line

Summary

Launching RStudio from a specific Conda environment ensures that your R sessions use the exact package versions, dependencies, and R executable isolated within that environment.

Body

Question

How do I launch Rstudio in a conda environment from the command line?

 

Answer

1. Open an anaconda prompt or terminal.

Note:  To open an Anaconda Prompt in Windows or the Terminal in MacOS, see "How-To: Using Anaconda -  Launch a Virtual Conda Environment via Command Line Interface

 

2. From the command line (CLI) in the base environment, activate the conda environment you wish to use.

Note:  To activate a conda environment, see "How-To: Using Anaconda - Activate a Virtual Conda Environment via Command Line Interface"

anaconda prompt with "conda activate my_rstudio_env"

 

3. From the CLI in the activated environment, add the Rstudio executable to the path:

set path="C:\Program Files\RStudio";%path%

anaconda prompt with "set path="C:\Program Files\RStudio";%path%"

Note:  Enure Rstudio was installed from the company portal so the above path is correct, see "How-To: Install Rstudio From Company Portal"

 

4. From the CLI in the activated environment, enter "rstudo" to launch.

anaconda prompt with "rstudio"

Details

Details

Article ID: 2457
Created
Fri 5/22/26 8:34 AM
Modified
Fri 5/29/26 11:25 AM