Closed andytai7 closed 2 months ago
Great that you have gone through the instruction on Mac too Andy!
That warning should not hinder you from terminating JupyterLab from terminal (I see it too when I don't have node installed). Try both Cmd +c and Ctrl +c on Mac.
Technically students are told to only use machines where the have admin rights, but I'm ok adding this as a tip in a quoted box so that it is clear it is a parenthesis on applying to some people.
Shouldn't the command be the same as in the Latex section though, also setting the group permissions: sudo chown -R $(whoami):admin /usr/local/bin
?
yup
I fixed a typo so the VS code installation should be marked with OK now. For the Rmarkdown issue, can you troubleshoot the same way as for the other platforms and try to find the location where quarto (and pandoc) are installed on your mac. The script is looking in /Applications/RStudio.app/...
and /opt/quarto...
but maybe the location has changed on mac
Sounds good
This is the difference i think: Use the first command when you need to change ownership of your personal configuration files to yourself. Use the second command when you need to change ownership and set group permissions for a system directory like /usr/local/bin, ensuring that it is managed by the current user and the admin group.
Also the first command targets R so i think just using the second one wouldn't work?
I suggest adding this line into the PR for mac installation:
"For students that are having computer admin issues, please run this in the terminal sudo chown -R (whoami) .config
"
Thanks
For pandoc, this is what i got.
(base) andytai@CPSC-M-21944 ~
$ Rscript -e "rmarkdown::find_pandoc(dir = c('/usr/lib/rstudio/resources/app/bin/quarto/bin/tools', 'C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools', '/Applications/RStudio.app/Contents/MacOS/quarto/bin/tools', '/Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools'), cache=F); rmarkdown::render('mds-knit-pdf-test.Rmd', output_format = 'pdf_document')"
$version
[1] ‘0’
$dir
NULL
Error: pandoc version 1.12.3 or higher is required and was not found (see the help page ?rmarkdown::pandoc_available).
Execution halted
Quarto is located in
/usr/local/bin/quarto
2. Yup correct about the group but I was thinking that it makes sense to also change the group permission for the admin group. There is nothing special about R in the first command from what I can see and note that you will need $
to preface (whoami)
for it be expanded into your username
4. Can you manually go looking for the Rstudio/quarto installation on your system? We will need the path to pandoc in the quarto installation. I don't want to use the path from /usr/local/bin even if pandoc might be there it could have been installed through any other means, so ideally we want to know where quarto/RStudio puts it on MacOS during installation. It's probably similar to one of the paths where are already looking in so start there.
"For students that are having computer admin issues, please run this in the terminal sudo chown -R $(whoami) .config
"
I did find pandoc in this location:
/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/rmarkdown/rmd/h/pandoc
I tested pandoc with quarto in rstudio, and it worked fine:
(base) andytai@CPSC-M-21944 ~
$ quarto render test.qmd --to html
processing file: test.qmd
1/5
2/5 [unnamed-chunk-1]
3/5
4/5 [unnamed-chunk-2]
5/5
output file: test.knit.md
pandoc
to: html
output-file: test.html
standalone: true
section-divs: true
html-math-method: mathjax
wrap: none
default-image-extension: png
2. Yes, formatted as a quote with >
4. Could you run which -a quarto
? Does it return more than one path?
For students that are having computer admin issues, please run this in the terminal
sudo chown -R $(whoami) .config
4.
(base) andytai@CPSC-M-21944 ~
$ which -a quarto
/usr/local/bin/quarto
/Applications/quarto/bin/quarto
2. Yup
4. Great! Is there a pandoc
executable in something like /Applications/quarto/bin/tools/
?
Yes i think here
(base) andytai@CPSC-M-21944 ~
$ /Applications/quarto/bin/tools/aarch64/pandoc ; exit;
Thanks! I think I found a more robust way to detect the pandoc path, could you try running the script again?
Checking program and package versions...
## Operating system
ProductName: macOS
ProductVersion: 14.6.1
BuildVersion: 23G93
## System programs
OK psql (PostgreSQL) 16.4
OK rstudio 2024.04.2+764
OK R 4.4.1 (2024-06-14) -- "Race for Your Life"
OK python 3.12.2
OK conda 4.7.1
OK bash 3.2.57(1)-release (arm64-apple-darwin23)
OK git 2.39.3 (Apple Git-146)
OK make 3.81
OK latex 3.141592653-2.6-1.40.26 (TeX Live 2024)
OK tlmgr 5-24 09:30:36 +0200)
OK docker 27.0.3, build 7d4bcd8
OK code 1.92.2
OK quarto 1.5.56
## Python packages
OK otter-grader=5.5.0
OK pandas=2.2.2
OK nbconvert-core=7.16.4
OK playwright=1.46.0
OK jupyterlab=4.2.4
OK jupyterlab-git=0.50.1
OK jupyterlab-spellchecker=0.8.4
OK jupyterlab PDF-generation was successful.
OK jupyterlab WebPDF-generation was successful.
OK jupyterlab HTML-generation was successful.
## R packages
OK tidyverse=2.0.0
OK markdown=1.13
OK rmarkdown=2.27
OK renv=1.0.7
OK IRkernel=1.3.2
OK tinytex=0.52
OK janitor=2.2.0
OK gapminder=1.0.0
OK readxl=1.4.3
OK ottr=1.1.3
OK canlang=0.0.1
MISSING rmarkdown PDF-generation failed. Check that quarto, rmarkdown, and latex are marked OK above, and that there is a pandoc executable in the following path:
MISSING rmarkdown HTML-generation failed. Check that quarto and rmarkdown are marked OK above and that there is a pandoc executable in the following path:
Ugh can you run this from terminal:
echo "cat(dirname(paste(rmarkdown::pandoc_exec())))" > tmp-quarto-pandoc.R
quarto run tmp-quarto-pandoc.R
I'm guessing you will see no output from the command above, so I went back to my old solution plus added the path you gave me. Try running the script again, Ithink it willl work now.
Everything looks great!
permission denied" macOS
Quoting from the link below, “ It's because Rstudio saves its preference in the ~.config folder which it do not have the permission to write. You can change the permission of .config folder to solve.” https://forum.posit.co/t/permission-denied-macos/123231
To fix this i ran this line of code in the terminal
sudo chown -R (whoami) .config
Moving the Stan installation down but this has been done in the pull request already i believe.
Finally running the post installation checks:
I get these missing programs:
Even though I have code installed, below shows check