IMHO, the ugliest part of local environments is the OS, and fighting with interactions.
But VMs can abstract away most of this, especially in a learning environment where performance isn't a primary goal.
Then you can have a known-good set of instructions that doesn't have to include messing with whatever Apple/Microsoft/Ubuntu changed recently.