I can't load code from https://github.com/tidymodels/TMwR - see error below

> install.packages("remotes")
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/remotes_2.2.0.tgz'
Content type 'application/x-gzip' length 386257 bytes (377 KB)
==================================================
downloaded 377 KB


The downloaded binary packages are in
	/var/folders/3m/dcxq5q_m8xj_zp001s74__6r0000gn/T//RtmpQPNpUU/downloaded_packages
> remotes::install_github("tidymodels/TMwR")
Downloading GitHub repo tidymodels/TMwR@HEAD
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

 1: All                                             
 2: CRAN packages only                              
 3: None                                            
 4: recipes      (0.1.12   -> c9b9987e7...) [GitHub]
 5: Rcpp         (1.0.4.6  -> 1.0.5       ) [CRAN]  
 6: pillar       (1.4.4    -> 1.4.6       ) [CRAN]  
 7: ellipsis     (0.3.0    -> 0.3.1       ) [CRAN]  
 8: vctrs        (0.3.0    -> 0.3.4       ) [CRAN]  
 9: tibble       (3.0.1    -> 3.0.3       ) [CRAN]  
10: rlang        (0.4.6    -> 0.4.7       ) [CRAN]  
11: glue         (1.4.0    -> 1.4.2       ) [CRAN]  
12: ps           (1.3.3    -> 1.3.4       ) [CRAN]  
13: processx     (3.4.2    -> 3.4.4       ) [CRAN]  
14: callr        (3.4.3    -> 3.4.4       ) [CRAN]  
15: pkgbuild     (1.0.8    -> 1.1.0       ) [CRAN]  
16: pkgload      (1.0.2    -> 1.1.0       ) [CRAN]  
17: withr        (2.2.0    -> 2.3.0       ) [CRAN]  
18: isoband      (0.2.1    -> 0.2.2       ) [CRAN]  
19: stringi      (1.4.6    -> 1.5.3       ) [CRAN]  
20: data.table   (1.12.8   -> 1.13.0      ) [CRAN]  
21: backports    (1.1.6    -> 1.1.10      ) [CRAN]  
22: xfun         (0.13     -> 0.17        ) [CRAN]  
23: tinytex      (0.22     -> 0.26        ) [CRAN]  
24: jsonlite     (1.6.1    -> 1.7.1       ) [CRAN]  
25: htmltools    (0.4.0    -> 0.5.0       ) [CRAN]  
26: knitr        (1.28     -> 1.30        ) [CRAN]  
27: rmarkdown    (2.1      -> 2.3         ) [CRAN]  
28: fs           (1.4.1    -> 1.5.0       ) [CRAN]  
29: cpp11        (0.1.0    -> 0.2.1       ) [CRAN]  
30: dplyr        (1.0.0    -> 1.0.2       ) [CRAN]  
31: tidyr        (1.0.3    -> 1.1.2       ) [CRAN]  
32: broom        (0.5.6    -> 0.7.0       ) [CRAN]  
33: sys          (3.3      -> 3.4         ) [CRAN]  
34: openssl      (1.4.1    -> 1.4.3       ) [CRAN]  
35: later        (1.0.0    -> 1.1.0.1     ) [CRAN]  
36: httpuv       (1.5.2    -> 1.5.4       ) [CRAN]  
37: promises     (1.1.0    -> 1.1.1       ) [CRAN]  
38: xts          (0.12-0   -> 0.12.1      ) [CRAN]  
39: DT           (0.13     -> 0.15        ) [CRAN]  
40: colourpicker (1.0      -> 1.1.0       ) [CRAN]  
41: shiny        (1.4.0.2  -> 1.5.0       ) [CRAN]  
42: V8           (3.0.2    -> 3.2.0       ) [CRAN]  
43: matrixStats  (0.56.0   -> 0.57.0      ) [CRAN]  
44: nloptr       (1.2.2.1  -> 1.2.2.2     ) [CRAN]  
45: StanHeaders  (2.21.0-1 -> 2.21.0-6    ) [CRAN]  
46: rstantools   (2.0.0    -> 2.1.1       ) [CRAN]  
47: rstan        (2.19.3   -> 2.21.2      ) [CRAN]  
48: loo          (2.2.0    -> 2.3.1       ) [CRAN]  
49: bayesplot    (1.7.1    -> 1.7.2       ) [CRAN]  
50: globals      (0.12.5   -> 0.13.0      ) [CRAN]  
51: parsnip      (0.1.1    -> 0.1.3       ) [CRAN]  
52: SQUAREM      (2020.2   -> 2020.4      ) [CRAN]  
53: lava         (1.6.7    -> 1.6.8       ) [CRAN]  
54: future       (1.17.0   -> 1.19.1      ) [CRAN]  
55: slider       (0.1.2    -> 0.1.5       ) [CRAN]  
56: modeldata    (0.0.1    -> 0.0.2       ) [CRAN]  
57: lubridate    (1.7.8    -> 1.7.9       ) [CRAN]  
58: gower        (0.2.1    -> 0.2.2       ) [CRAN]  
59: rsample      (0.0.6    -> 0.0.8       ) [CRAN]  
60: yardstick    (0.0.6    -> 0.0.7       ) [CRAN]  
61: httr         (1.4.1    -> 1.4.2       ) [CRAN]  
62: gplots       (3.0.4    -> 3.1.0       ) [CRAN]  
63: dendextend   (1.13.4   -> 1.14.0      ) [CRAN]  
64: rvest        (0.3.5    -> 0.3.6       ) [CRAN]  
65: modelr       (0.1.7    -> 0.1.8       ) [CRAN]  
66: haven        (2.2.0    -> 2.3.1       ) [CRAN]  
67: dbplyr       (1.4.3    -> 1.4.4       ) [CRAN]  
68: kableExtra   (1.1.0    -> 1.2.1       ) [CRAN]  
69: bookdown     (0.18     -> 0.20        ) [CRAN]  

Enter one or more numbers, or an empty line to skip updates:
Downloading GitHub repo tidymodels/tune@HEAD
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

 1: All                                         
 2: CRAN packages only                          
 3: None                                        
 4: rsample   (0.0.6   -> ae99c8624...) [GitHub]
 5: cpp11     (0.1.0   -> 0.2.1       ) [CRAN]  
 6: pillar    (1.4.4   -> 1.4.6       ) [CRAN]  
 7: ellipsis  (0.3.0   -> 0.3.1       ) [CRAN]  
 8: vctrs     (0.3.0   -> 0.3.4       ) [CRAN]  
 9: globals   (0.12.5  -> 0.13.0      ) [CRAN]  
10: tidyr     (1.0.3   -> 1.1.2       ) [CRAN]  
11: glue      (1.4.0   -> 1.4.2       ) [CRAN]  
12: tibble    (3.0.1   -> 3.0.3       ) [CRAN]  
13: rlang     (0.4.6   -> 0.4.7       ) [CRAN]  
14: dplyr     (1.0.0   -> 1.0.2       ) [CRAN]  
15: Rcpp      (1.0.4.6 -> 1.0.5       ) [CRAN]  
16: future    (1.17.0  -> 1.19.1      ) [CRAN]  
17: ps        (1.3.3   -> 1.3.4       ) [CRAN]  
18: processx  (3.4.2   -> 3.4.4       ) [CRAN]  
19: backports (1.1.6   -> 1.1.10      ) [CRAN]  
20: callr     (3.4.3   -> 3.4.4       ) [CRAN]  
21: pkgbuild  (1.0.8   -> 1.1.0       ) [CRAN]  
22: withr     (2.2.0   -> 2.3.0       ) [CRAN]  
23: pkgload   (1.0.2   -> 1.1.0       ) [CRAN]  
24: SQUAREM   (2020.2  -> 2020.4      ) [CRAN]  
25: lava      (1.6.7   -> 1.6.8       ) [CRAN]  
26: parsnip   (0.1.1   -> 0.1.3       ) [CRAN]  
27: slider    (0.1.2   -> 0.1.5       ) [CRAN]  
28: modeldata (0.0.1   -> 0.0.2       ) [CRAN]  
29: isoband   (0.2.1   -> 0.2.2       ) [CRAN]  
30: lubridate (1.7.8   -> 1.7.9       ) [CRAN]  
31: gower     (0.2.1   -> 0.2.2       ) [CRAN]  
32: yardstick (0.0.6   -> 0.0.7       ) [CRAN]  
33: recipes   (0.1.12  -> 0.1.13      ) [CRAN]  

Enter one or more numbers, or an empty line to skip updates:
Downloading GitHub repo tidymodels/workflows@HEAD
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

 1: All                               
 2: CRAN packages only                
 3: None                              
 4: rlang    (0.4.6  -> 0.4.7 ) [CRAN]
 5: pillar   (1.4.4  -> 1.4.6 ) [CRAN]
 6: cpp11    (0.1.0  -> 0.2.1 ) [CRAN]
 7: vctrs    (0.3.0  -> 0.3.4 ) [CRAN]
 8: tibble   (3.0.1  -> 3.0.3 ) [CRAN]
 9: glue     (1.4.0  -> 1.4.2 ) [CRAN]
10: ellipsis (0.3.0  -> 0.3.1 ) [CRAN]
11: dplyr    (1.0.0  -> 1.0.2 ) [CRAN]
12: globals  (0.12.5 -> 0.13.0) [CRAN]
13: tidyr    (1.0.3  -> 1.1.2 ) [CRAN]
14: parsnip  (0.1.1  -> 0.1.3 ) [CRAN]

Enter one or more numbers, or an empty line to skip updates:
Installing 1 packages: hardhat
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/hardhat_0.1.4.tgz'
Content type 'application/x-gzip' length 716341 bytes (699 KB)
==================================================
downloaded 699 KB


The downloaded binary packages are in
	/var/folders/3m/dcxq5q_m8xj_zp001s74__6r0000gn/T//RtmpQPNpUU/downloaded_packages
✓  checking for file ‘/private/var/folders/3m/dcxq5q_m8xj_zp001s74__6r0000gn/T/RtmpQPNpUU/remotesfca15751d737/tidymodels-workflows-213d4cd/DESCRIPTION’ ...
─  preparing ‘workflows’:
✓  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘workflows_0.2.0.9000.tar.gz’
   
* installing *source* package ‘workflows’ ...
** using staged installation
** R
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  namespace ‘parsnip’ 0.1.1 is being loaded, but >= 0.1.3 is required
Calls: <Anonymous> ... namespaceImportFrom -> asNamespace -> loadNamespace
Execution halted
ERROR: lazy loading failed for package ‘workflows’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/workflows’
Error: Failed to install 'TMwR' from GitHub:
  Failed to install 'tune' from GitHub:
  Failed to install 'workflows' from GitHub:
  (converted from warning) installation of package ‘/var/folders/3m/dcxq5q_m8xj_zp001s74__6r0000gn/T//RtmpQPNpUU/filefca13b440ff4/workflows_0.2.0.9000.tar.gz’ had non-zero exit status
> bookdown::render_book("index.Rmd", "bookdown::gitbook")
Error in bookdown::render_book("index.Rmd", "bookdown::gitbook") : 
  No input R Markdown files found from the current directory /Users/theoneal/Desktop/R_desktop/Tidy_models or in the rmd_files field of _bookdown.yml
> remotes::install_github("tidymodels/TMwR")
Downloading GitHub repo tidymodels/TMwR@HEAD
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

 1: All                                             
 2: CRAN packages only                              
 3: None                                            
 4: recipes      (0.1.12   -> c9b9987e7...) [GitHub]
 5: Rcpp         (1.0.4.6  -> 1.0.5       ) [CRAN]  
 6: pillar       (1.4.4    -> 1.4.6       ) [CRAN]  
 7: ellipsis     (0.3.0    -> 0.3.1       ) [CRAN]  
 8: vctrs        (0.3.0    -> 0.3.4       ) [CRAN]  
 9: tibble       (3.0.1    -> 3.0.3       ) [CRAN]  
10: rlang        (0.4.6    -> 0.4.7       ) [CRAN]  
11: glue         (1.4.0    -> 1.4.2       ) [CRAN]  
12: ps           (1.3.3    -> 1.3.4       ) [CRAN]  
13: processx     (3.4.2    -> 3.4.4       ) [CRAN]  
14: callr        (3.4.3    -> 3.4.4       ) [CRAN]  
15: pkgbuild     (1.0.8    -> 1.1.0       ) [CRAN]  
16: pkgload      (1.0.2    -> 1.1.0       ) [CRAN]  
17: withr        (2.2.0    -> 2.3.0       ) [CRAN]  
18: isoband      (0.2.1    -> 0.2.2       ) [CRAN]  
19: stringi      (1.4.6    -> 1.5.3       ) [CRAN]  
20: data.table   (1.12.8   -> 1.13.0      ) [CRAN]  
21: backports    (1.1.6    -> 1.1.10      ) [CRAN]  
22: xfun         (0.13     -> 0.17        ) [CRAN]  
23: tinytex      (0.22     -> 0.26        ) [CRAN]  
24: jsonlite     (1.6.1    -> 1.7.1       ) [CRAN]  
25: htmltools    (0.4.0    -> 0.5.0       ) [CRAN]  
26: knitr        (1.28     -> 1.30        ) [CRAN]  
27: rmarkdown    (2.1      -> 2.3         ) [CRAN]  
28: fs           (1.4.1    -> 1.5.0       ) [CRAN]  
29: cpp11        (0.1.0    -> 0.2.1       ) [CRAN]  
30: dplyr        (1.0.0    -> 1.0.2       ) [CRAN]  
31: tidyr        (1.0.3    -> 1.1.2       ) [CRAN]  
32: broom        (0.5.6    -> 0.7.0       ) [CRAN]  
33: sys          (3.3      -> 3.4         ) [CRAN]  
34: openssl      (1.4.1    -> 1.4.3       ) [CRAN]  
35: later        (1.0.0    -> 1.1.0.1     ) [CRAN]  
36: httpuv       (1.5.2    -> 1.5.4       ) [CRAN]  
37: promises     (1.1.0    -> 1.1.1       ) [CRAN]  
38: xts          (0.12-0   -> 0.12.1      ) [CRAN]  
39: DT           (0.13     -> 0.15        ) [CRAN]  
40: colourpicker (1.0      -> 1.1.0       ) [CRAN]  
41: shiny        (1.4.0.2  -> 1.5.0       ) [CRAN]  
42: V8           (3.0.2    -> 3.2.0       ) [CRAN]  
43: matrixStats  (0.56.0   -> 0.57.0      ) [CRAN]  
44: nloptr       (1.2.2.1  -> 1.2.2.2     ) [CRAN]  
45: StanHeaders  (2.21.0-1 -> 2.21.0-6    ) [CRAN]  
46: rstantools   (2.0.0    -> 2.1.1       ) [CRAN]  
47: rstan        (2.19.3   -> 2.21.2      ) [CRAN]  
48: loo          (2.2.0    -> 2.3.1       ) [CRAN]  
49: bayesplot    (1.7.1    -> 1.7.2       ) [CRAN]  
50: globals      (0.12.5   -> 0.13.0      ) [CRAN]  
51: parsnip      (0.1.1    -> 0.1.3       ) [CRAN]  
52: SQUAREM      (2020.2   -> 2020.4      ) [CRAN]  
53: lava         (1.6.7    -> 1.6.8       ) [CRAN]  
54: future       (1.17.0   -> 1.19.1      ) [CRAN]  
55: slider       (0.1.2    -> 0.1.5       ) [CRAN]  
56: modeldata    (0.0.1    -> 0.0.2       ) [CRAN]  
57: lubridate    (1.7.8    -> 1.7.9       ) [CRAN]  
58: gower        (0.2.1    -> 0.2.2       ) [CRAN]  
59: rsample      (0.0.6    -> 0.0.8       ) [CRAN]  
60: yardstick    (0.0.6    -> 0.0.7       ) [CRAN]  
61: httr         (1.4.1    -> 1.4.2       ) [CRAN]  
62: gplots       (3.0.4    -> 3.1.0       ) [CRAN]  
63: dendextend   (1.13.4   -> 1.14.0      ) [CRAN]  
64: rvest        (0.3.5    -> 0.3.6       ) [CRAN]  
65: modelr       (0.1.7    -> 0.1.8       ) [CRAN]  
66: haven        (2.2.0    -> 2.3.1       ) [CRAN]  
67: dbplyr       (1.4.3    -> 1.4.4       ) [CRAN]  
68: kableExtra   (1.1.0    -> 1.2.1       ) [CRAN]  
69: bookdown     (0.18     -> 0.20        ) [CRAN]  

Enter one or more numbers, or an empty line to skip updates:
Downloading GitHub repo tidymodels/tune@HEAD
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

 1: All                                         
 2: CRAN packages only                          
 3: None                                        
 4: rsample   (0.0.6   -> ae99c8624...) [GitHub]
 5: cpp11     (0.1.0   -> 0.2.1       ) [CRAN]  
 6: pillar    (1.4.4   -> 1.4.6       ) [CRAN]  
 7: ellipsis  (0.3.0   -> 0.3.1       ) [CRAN]  
 8: vctrs     (0.3.0   -> 0.3.4       ) [CRAN]  
 9: globals   (0.12.5  -> 0.13.0      ) [CRAN]  
10: tidyr     (1.0.3   -> 1.1.2       ) [CRAN]  
11: glue      (1.4.0   -> 1.4.2       ) [CRAN]  
12: tibble    (3.0.1   -> 3.0.3       ) [CRAN]  
13: rlang     (0.4.6   -> 0.4.7       ) [CRAN]  
14: dplyr     (1.0.0   -> 1.0.2       ) [CRAN]  
15: Rcpp      (1.0.4.6 -> 1.0.5       ) [CRAN]  
16: future    (1.17.0  -> 1.19.1      ) [CRAN]  
17: ps        (1.3.3   -> 1.3.4       ) [CRAN]  
18: processx  (3.4.2   -> 3.4.4       ) [CRAN]  
19: backports (1.1.6   -> 1.1.10      ) [CRAN]  
20: callr     (3.4.3   -> 3.4.4       ) [CRAN]  
21: pkgbuild  (1.0.8   -> 1.1.0       ) [CRAN]  
22: withr     (2.2.0   -> 2.3.0       ) [CRAN]  
23: pkgload   (1.0.2   -> 1.1.0       ) [CRAN]  
24: SQUAREM   (2020.2  -> 2020.4      ) [CRAN]  
25: lava      (1.6.7   -> 1.6.8       ) [CRAN]  
26: parsnip   (0.1.1   -> 0.1.3       ) [CRAN]  
27: slider    (0.1.2   -> 0.1.5       ) [CRAN]  
28: modeldata (0.0.1   -> 0.0.2       ) [CRAN]  
29: isoband   (0.2.1   -> 0.2.2       ) [CRAN]  
30: lubridate (1.7.8   -> 1.7.9       ) [CRAN]  
31: gower     (0.2.1   -> 0.2.2       ) [CRAN]  
32: yardstick (0.0.6   -> 0.0.7       ) [CRAN]  
33: recipes   (0.1.12  -> 0.1.13      ) [CRAN]  

Enter one or more numbers, or an empty line to skip updates:
Downloading GitHub repo tidymodels/workflows@HEAD
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

 1: All                               
 2: CRAN packages only                
 3: None                              
 4: rlang    (0.4.6  -> 0.4.7 ) [CRAN]
 5: pillar   (1.4.4  -> 1.4.6 ) [CRAN]
 6: cpp11    (0.1.0  -> 0.2.1 ) [CRAN]
 7: vctrs    (0.3.0  -> 0.3.4 ) [CRAN]
 8: tibble   (3.0.1  -> 3.0.3 ) [CRAN]
 9: glue     (1.4.0  -> 1.4.2 ) [CRAN]
10: ellipsis (0.3.0  -> 0.3.1 ) [CRAN]
11: dplyr    (1.0.0  -> 1.0.2 ) [CRAN]
12: globals  (0.12.5 -> 0.13.0) [CRAN]
13: tidyr    (1.0.3  -> 1.1.2 ) [CRAN]
14: parsnip  (0.1.1  -> 0.1.3 ) [CRAN]

Enter one or more numbers, or an empty line to skip updates:
✓  checking for file ‘/private/var/folders/3m/dcxq5q_m8xj_zp001s74__6r0000gn/T/RtmpQPNpUU/remotesfca138f53ca7/tidymodels-workflows-213d4cd/DESCRIPTION’ ...
─  preparing ‘workflows’:
✓  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘workflows_0.2.0.9000.tar.gz’
   
* installing *source* package ‘workflows’ ...
** using staged installation
** R
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  namespace ‘parsnip’ 0.1.1 is being loaded, but >= 0.1.3 is required
Calls: <Anonymous> ... namespaceImportFrom -> asNamespace -> loadNamespace
Execution halted
ERROR: lazy loading failed for package ‘workflows’
* removing ‘/Library/Frameworks/R.framework/Versions/3.6/Resources/library/workflows’
Error: Failed to install 'TMwR' from GitHub:
  Failed to install 'tune' from GitHub:
  Failed to install 'workflows' from GitHub:
  (converted from warning) installation of package ‘/var/folders/3m/dcxq5q_m8xj_zp001s74__6r0000gn/T//RtmpQPNpUU/filefca16c611527/workflows_0.2.0.9000.tar.gz’ had non-zero exit status

Can you try it from a fresh R session? It looks like parsnip was already loaded and needed to update.

The error messages indicate compilation failures, which often occur on macOS for reasons usually having to do with lack of a properly updated XCode app and its command line utilities.

The configuration shown in the OP indicates another likely source of errors: a lagging version of R.

Updating to Catalina, R 4, XCode current version, installing the command line utilities may, but is not assured, to resolve the problem. Whenever possible install binaries.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.