'%pylab' is a magic function in Jupiter notebooks. Magic functions define shortcuts for a series of actions. In this particular case, it triggers the import of various modules within Matplotlib.
However, magic functions will not work outside of a notebook, which is why the code recipe shows a syntax error.
The solution here is to remove the '%pylab inline' line from the code recipe.