1
1
# Setting up your computer {#move-to-your-own-machine}
2
2
3
+ ``` {r setup-machine-setup, include = FALSE}
4
+ library(tidyverse)
5
+ library(cowplot)
6
+ library(knitr)
7
+ library(magick)
8
+
9
+ knitr::opts_chunk$set(fig.align = "center")
10
+
11
+ options(knitr.table.format = ifelse(knitr::is_latex_output(), "latex", "html"))
12
+ ```
13
+
3
14
## Overview
4
15
5
16
In this chapter, you'll learn how to set up the software
@@ -175,53 +186,42 @@ JupyterLab Desktop, the JupyterLab Git extension, and all of the R packages need
175
186
176
187
### Ubuntu
177
188
178
- First, we will install Git. Open the terminal and type the following commands:
179
-
189
+ First, we will install Git for version control.
190
+ Open the terminal and type the following commands:
180
191
```
181
192
sudo apt update
182
193
sudo apt install git
183
194
```
184
-
185
195
Next, visit the [ "Installation" section of the JupyterLab Desktop homepage] ( https://github.com/jupyterlab/jupyterlab-desktop#installation ) .
186
- Download and run the installer for Ubuntu/Debian.
187
- To install the JupyterLab Git extension, run JupyterLab Desktop,
188
- open a notebook, and run the following code in a cell:
196
+ Download the ` JupyterLab-Setup-Debian.deb ` installer file for Ubuntu/Debian.
197
+ Open a terminal, navigate to where the installer file was downloaded, and run the command
189
198
```
190
- %pip install --upgrade jupyterlab-git
199
+ sudo dpkg -i JupyterLab-Setup-Debian.deb
191
200
```
192
- Finally, we will install the IRkernel and R packages
193
-
194
- TODO
195
-
196
- ### Windows
197
-
198
- TODO
199
-
200
- ### MacOS
201
-
202
- TODO
203
-
204
-
205
-
206
- - jupyterlab-git
207
- conda install -c conda-forge -y jupyterlab
208
- conda install -y nodejs
209
- pip install --upgrade jupyterlab-git
210
-
211
- R, R packages, and the IRkernel
201
+ Run JupyterLab Desktop using the command
202
+ ```
203
+ jlab
204
+ ```
205
+ You will see python environment not found. click to use the bundled installer
212
206
207
+ Next, we need to add the JupyterLab Git extension so that
208
+ we can use version control directly from within JupyterLab Desktop.
209
+ In JupyterLab Desktop, click "New notebook...", and run the following code in a cell:
210
+ ```
211
+ %pip install --upgrade jupyterlab-git
212
+ ```
213
213
To have the software \index{R installation} used in this book available to you in JupyterLab,
214
- you will need to install the R programming language,
215
- several R packages,
216
- and the \index{kernel!installation} IRkernel.
214
+ you will need to install the R programming language via the IRkernel.
215
+ Run the following code in another cell:
216
+ ```
217
+ %conda install -c conda-forge r-irkernel
218
+ ```
219
+ Finally, you will need several R packages.
217
220
To install versions of these that are compatible with the accompanying worksheets,
218
- type the command shown below into the Anaconda Prompt (Windows)
219
- or terminal (MacOS and Ubuntu).
220
-
221
+ type the command shown below into into another cell:
221
222
```
222
- conda env update --file https://raw.githubusercontent.com/UBC-DSCI/data-science-a-first-intro-worksheets/main/environment.yml
223
+ % conda env update --file https://raw.githubusercontent.com/UBC-DSCI/data-science-a-first-intro-worksheets/main/environment.yml
223
224
```
224
-
225
225
This command installs the specific R and package versions specified in
226
226
the ` environment.yml ` file found in
227
227
[ the worksheets repository] ( https://worksheets.datasciencebook.ca ) .
@@ -238,22 +238,28 @@ so that they are compatible with the exercise worksheets that accompany the book
238
238
> they are!
239
239
>
240
240
> ```
241
- > conda install -c conda-forge -y \
242
- > r-base \
243
- > r-cowplot \
244
- > r-ggally \
245
- > r-gridextra \
246
- > r-irkernel \
247
- > r-kknn \
248
- > r-rpostgres \
249
- > r-rsqlite \
250
- > r-scales \
251
- > r-testthat \
252
- > r-tidymodels \
253
- > r-tidyverse \
254
- > unixodbc
241
+ > %conda install -c conda-forge r-base r-cowplot r-ggally r-gridextra
242
+ > %conda install -c conda-forge r-kknn r-rpostgres r-rsqlite r-scales r-testthat
243
+ > %conda install -c conda-forge r-tidymodels r-tidyverse unixodbc
255
244
> ```
256
245
246
+ ### Windows
247
+
248
+ TODO
249
+
250
+ ### MacOS
251
+
252
+ TODO
253
+
254
+
255
+
256
+ - jupyterlab-git
257
+ conda install -c conda-forge -y jupyterlab
258
+ conda install -y nodejs
259
+ pip install --upgrade jupyterlab-git
260
+
261
+ R, R packages, and the IRkernel
262
+
257
263
## Finishing up installation
258
264
259
265
It is good practice to restart all the programs you used when installing this
0 commit comments