I’ll try to give a complete explanation here (sorry for the length of the post). I’ll start by summarising how I typically proceed:
- I create course content as Jupyter notebooks for a “real” in-person course that I have to give. The material usually ends up in a Github repository. Note that these courses are “crash-courses” of 1-2 days for people with some Python experience but not necessarily with Jupyter.
- For the live course, I set up a JupyterHub with all the course material (TLJH + nbgitpuller) and students can just login. At the beginning of the course, I go through notebooks super-basics, just so that people can execute and modify code.
- The course itself is a mix of me going through notebooks/live coding and exercises that students can do in the notebook. In that sense, I see notebooks as “in the background”. They are just a medium to offer content and a a simple platform to start coding immediately.
- I try to make the course available and runnable to anyone using Binder.
- I try to give instructions on how to run the course locally, usually using conda
Here are a few examples of courses:
- This is a bioimage processing course, and to this day my most complete course using Jupyter/Binder. I used it for a large scale webinar with almost 400 participants: https://github.com/guiwitz/neubias_academy_biapy
- This is a crahs course on Pandas: https://github.com/guiwitz/Pandas_course
- This is a course on Dask. It’s the only example where I used Jupyterlab to have access to the dask-dashboard (it’s not yet entirely runnable on Binder because of issues with large datasets): https://github.com/guiwitz/DaskCourse
Now I have two main reasons for which I tend to use the classic notebook interface:
- It offers notebooks as simple documents which look just like on GitHub or nbviewer with the additional option that one can run things. This makes the user experience (especially for beginners) very consistent. If there are “other things” on the page, people get naturally distracted and/or confused.
- Installation: in general people want to try to install things locally at some point. Given that ranting about difficulties of installing things in Python is a popular activity, I try to show people how simple it is, and usually tell them to install miniconda and then provide an environment.yml file (often the same as for Binder) for installation. That works usually great. But here comes the JupyterLab drawback: installing extensions can be a pain. First, they cannot be added to the environment.yml file (if I’m wrong about that, I’d be super happy to learn about a solution!). Second, the installation is not straightforward: they need to be built, then one has often to restart, sometimes there a version problems and extensions work only with a certain Jupyterlab version etc. As I said, I enjoy working with JupyterLab, and those problems can be overcome with a bit of experience, but I think it can scare away people who have been primed with the “Python is difficult to install” moto. In some cases, one even runs in true issues: I really struggled for example at some point with installing extensions on a JupyterHub because somehow there was a limit on “build size” and I had to use some additional options.
I’m not entirely sure about how valid my point 1. is, and it rests more on an impression. The Dask course that I gave was on Jupyterlab and in the end people were not very confused (but probably these were more experienced users). So if the extension installation process was easier I would probably tend to use Jupyterlab most of the time. In my opinion some should actually be included by default (like matplotlib widgets, ipywidgets, table of content etc.), but I’m not at all familiar with the technology behind them to know if that’s feasible at all. I know that there is the extension-manager, but I sometimes ran into trouble with it. Maybe it has become more stable now and this is the way to go?
I’m completely aware that there’s no major “objection” in what I wrote for using JupyterLab and I often hear from experienced users that those are minor issues. But beginners get frustrated very easily, and my goal is to make them use Python so that they see all the benefits before they run into those issues.
I hope that helps! Sorry again for the length of the post!