-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.Rprofile
More file actions
19 lines (14 loc) · 792 Bytes
/
.Rprofile
File metadata and controls
19 lines (14 loc) · 792 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# This file configures the virtualenv and Python paths differently depending on
# the environment the app is running in (local vs remote server).
# ------------------------- Settings (Do not edit) -------------------------- #
if (Sys.info()[["user"]] == "shiny"){
# Running on shinyapps.io
Sys.setenv(PYTHON_PATH = "python3")
Sys.setenv(VIRTUALENV_NAME = "shiny_panda") # Installs into default shiny virtualenvs dir
Sys.setenv(RETICULATE_PYTHON = paste0("/home/shiny/.virtualenvs/", "shiny_panda", "/bin/python"))
} else {
# Running locally
Sys.setenv(PYTHON_PATH = "python3")
Sys.setenv(VIRTUALENV_NAME = "shiny_panda") # exclude "/" => installs into ~/.virtualenvs/
# RETICULATE_PYTHON is not required locally, RStudio infers it based on the ~/.virtualenvs path
}