Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation Instructions 2022/23 #138

Open
flor14 opened this issue Aug 6, 2022 · 7 comments
Open

Installation Instructions 2022/23 #138

flor14 opened this issue Aug 6, 2022 · 7 comments

Comments

@flor14
Copy link

flor14 commented Aug 6, 2022

@flor14
Copy link
Author

flor14 commented Aug 11, 2022

@joelostblom do you know that the version of bash that Macs are using by default is 3.2? What do you get if you run bash --version on your Linux computer? My Windows installation from last year is running bash 4.4.
This didn't produce evident problems last year. Do you have a comment about this?
https://tiswww.case.edu/php/chet/bash/bashtop.html#CurrentStatus

@joelostblom
Copy link

joelostblom commented Aug 11, 2022

Sorry this became quite long xp The summary is that it would be better to switch to a new version of Bash or to Zsh, but all the solutions I could think of two years ago would require a rather big time investment to make sure they work properly, so I stuck with old Bash on Macs.


Yes, the default version on Macs is ancient =( I believe it is due to a licensing change that made MacOS stop including new updates of Bash. This is annoying and leads to some new features breaking (e.g. tab cycling and I had to write the setup instructions slightly different for bash on mac).

A few years ago, MacOS switch to Zsh as their default terminal, which is great and what I have been using myself for several years. I think we should eventually change from Bash to Zsh everywhere in the MDS, but it is currently hard to run on Windows unless we go full WSL2. Checking that WSL2 works well on windows for everything in MDS is a rather big undertaking and I would like us to have someone on the teaching team that runs this daily themselves before recommending it to students, so I opened #72 for that earlier.

So when I was thinking about this two years ago, I saw the following alternatives:

  1. Run Zsh only on Mac (and maybe Linux)
    • Good for these two OSes, but setup instructions and config files will be slightly different and it might lead to some confusion somewhere. Zsh should work as a drop in replacement for Bash and there should not be any issues, but I didn't have time to test it fully to make sure. Having that said, I think I ran Zsh in all my recordings two years ago, and I didn't have an issue with anything in 521.
  2. Use homebrew to install a newer version of bash on MacOS
    • This would require an extra step in the setup, and I don't have much experience with homebrew so I didn't want to introduce it as a potential source of errors. We could change all package installations to homebrew as mentioned in Consider using a package manager for MacOS in 2022 #78, but that was too big of an undertaking for me, and I would like someone who runs Mac on the teaching team to test this first as their daily drive. Homebrew is also mentioned in Bash not installed on some M1 macs? #121
  3. Keep old Bash and make sure it works properly.
    • This was the safest solution and the one that required the least amount of time, which is why I chose to stay with it.

@flor14
Copy link
Author

flor14 commented Aug 13, 2022

Thanks, @joelostblom for the detailed explanation. Updating this seems important to me, and we have evidence that works. However, I am switching to Mac this year, and doesn't seem a good idea to update this so close to the start of the year. We should do it during the year.

I have finished the installation in a Mac M2 (#139) and here I will paste the most important changes so you can check them on Linux. Also, there are 2 cases I have not changed yet but are not working. Comments are welcomed.

  • I added Quarto as software and also the VS Code extension

  • The packages xaringan and blogdown were removed and I added markdown because it was requested when I tried to render a PDF using R Markdown.

  • It was not possible to add the operator -> and the new pipe |> as a keyboard shortcut in Jupyter Lab as the interface has changed (NOT SOLVED)

  • Your program mds-help is not working anymore 😢 (NOT SOLVED)

  • There is a bug when trying to export to HTML using Jupyter Lab. I could make it work by downgrading jinja2 to version 3.0.3. I added this as a note in the instructions as it is expected to be solved next year.

  • I upgrade python to version 3.10 after the installation of Miniconda.

  • I removed the version when installing pyppeteer (I am not sure why the version was pinned)

Here is the result. I am not sure why it is saying that rmakdown is not building the PDF and HTML because it works for me.

Checking program and package versions...

## Operating system
ProductName: macOS
ProductVersion: 12.5
BuildVersion: 21G72

MISSING You need macOS Big Sur (11.4.x or 11.5.x).

## System programs
MISSING   postgreSQL 13.*
MISSING   rstudio 2021.09.*
OK        R 4.2.1 (2022-06-23) -- "Funny-Looking Kid"
OK        python 3.10.5
OK        conda 4.13.0
OK        bash 3.2.57(1)-release (arm64-apple-darwin21)
OK        git 2.32.1 (Apple Git-133)
OK        make 3.81
OK        latex 3.141592653-2.6-1.40.24 (TeX Live 2022)
OK        tlmgr 58:07 +0200)
OK        docker 20.10.17, build 100c701
OK        code 1.70.1

## Python packages
OK        pandas=1.4.3
MISSING   pyppeteer=0.*
OK        nbconvert=6.4.4
OK        jupyterlab=3.4.5
OK        jupyterlab-git=0.38.0
OK        jupytext=1.14.0
OK        jupyterlab-spellchecker=0.7.2
OK        jupyterlab PDF-generation was successful.
OK        jupyterlab WebPDF-generation was successful.
OK        jupyterlab HTML-generation was successful.

## R packages
OK        tidyverse=1.3.2
MISSING   blogdown=1.*
MISSING   xaringan=0.*
OK        renv=0.15.5
OK        IRkernel=1.3
OK        tinytex=0.40
OK        janitor=2.1.0
OK        gapminder=0.3.0
OK        readxl=1.4.0
OK        ottr=1.1.3
OK        canlang=0.0.1
MISSING   rmarkdown PDF-generation failed. Check that latex and rmarkdown are marked OK above.
MISSING   rmarkdown HTML-generation failed. Check that rmarkdown is marked OK above.

@joelostblom
Copy link

I agree that updating it this close to the start of the year is risky, so doing it later sounds like a good plan! I went ahead and did the Linux instructions update now as well so that there is time to revise before next week. I went through your checklist and opened two PRs with updates, here are my replies to the points above:

I added Quarto as software and also the VS Code extension

👍 I did the same to the Linux instructions.

The packages xaringan and blogdown were removed and I added markdown because it was requested when I tried to render a PDF using R Markdown.

👍 I did the same to the Linux instructions.

It was not possible to add the operator -> and the new pipe |> as a keyboard shortcut in Jupyter Lab as the interface has changed (NOT SOLVED)

I added the new steps in #141.

Your program mds-help is not working anymore cry (NOT SOLVED)

Hmm, it does work for me. Did you run the second curl command to download the help script? (curl -Sso ~/.mds-help.sh https://raw.githubusercontent.com/UBC-MDS/UBC-MDS.github.io/master/resources_pages/mds-help.sh). And confirm that there was a file downloaded to the location ~/.mds-help.sh (it will only work in bash, not zsh)?

There is a bug when trying to export to HTML using Jupyter Lab. I could make it work by downgrading jinja2 to version 3.0.3. I added this as a note in the instructions as it is expected to be solved next year.

Odd, it works for me with jinja 3.1.2 🤷‍♂️

I upgrade python to version 3.10 after the installation of Miniconda.

I added this too. I also asked the doc team to create a new release, but it will probably not happen in time.

I removed the version when installing pyppeteer (I am not sure why the version was pinned)

I think this was pinned last year because there was issues with an older version being installed. There are currently issues on Linux with webpdf export, I have noted them in #141

@flor14
Copy link
Author

flor14 commented Aug 15, 2022

Windows installation works without problems after trying #140 🎉

## Operating system
Microsoft Windows 11 Education
64-bit
10.0.22000

MISSING You need at least Windows build 10.0.19041. Please run Windows update.

## System programs
OK        psql (PostgreSQL) 14.5
OK        rstudio 2022.07.1+554
OK        tlmgr revision 63068 (2022-04-18 07:58:07 +0200)
OK        R 4.2.1 (2022-06-23 ucrt) -- "Funny-Looking Kid"
OK        python 3.10.0
OK        conda 4.13.0
OK        bash 4-pc-msys)
OK        git 2.37.2.windows.2
OK        make 4.3
OK        latex 3.141592653-2.6-1.40.24 (TeX Live 2022)
OK        docker 20.10.17, build 100c701
OK        code 1.70.1

## Python packages
OK        pandas=1.4.3
OK        pyppeteer=1.0.2
OK        nbconvert=6.5.3
OK        jupyterlab=3.4.5
OK        jupyterlab-git=0.38.0
OK        jupytext=1.14.0
OK        jupyterlab-spellchecker=0.7.2
OK        jupyterlab PDF-generation was successful.
OK        jupyterlab WebPDF-generation was successful.
OK        jupyterlab HTML-generation was successful.

## R packages
OK        tidyverse=1.3.2
OK        markdown=1.1
OK        rmarkdown=2.14
OK        renv=0.15.5
OK        IRkernel=1.3
OK        tinytex=0.40
OK        janitor=2.1.0
OK        gapminder=0.3.0
OK        readxl=1.4.0
OK        ottr=1.1.3
OK        canlang=0.0.1
OK        rmarkdown PDF-generation was successful.
OK        rmarkdown HTML-generation was successful.

The above output has been saved to the file /c/Users/Florencia/check-setup-mds.log
together with system configuration details and any detailed error messages about PDF and HTML generation.
You can open this folder in your file browser by typing `explorer .` (without the surrounding backticks).

@flor14
Copy link
Author

flor14 commented Aug 15, 2022

I have just realized this message appears on the script and I think it is not necessary @joelostblom

MISSING You need at least Windows build 10.0.19041. Please run Windows update.

@joelostblom
Copy link

I tried adding support for win 11 in #145

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants