[IPython-dev] --pylab is no more -- Notebook server with --pylab now deprecated

Matthias BUSSONNIER bussonniermatthias at gmail.com
Sun Apr 20 21:58:04 EDT 2014

Hi List, 

Sorry for the (slightly) exaggerated title.


Starting a few hours ago on master

Notebook server will **not** start anymore with the --pylab flag. 

cf https://github.com/ipython/ipython/pull/5593
pylab mode does still exist, --pylab flag for other frontends still exist. (for now)
We recommend using %matplotlib magics, and explicit import. 

Longer version. 

As you all know, IPython is constantly moving forward, and we are already 
preparing 3.0 that targets to integrate other non-python kernels deeper into 
the architecture.

To do so we to remove all python-ism that have leaked into the main architecture, 
and one of them is the forwarding of flags from the notebook server to the difference
kernels it starts.

One of the side effect of the following is that the --pylab flag (that does not make
sense for non-IPython kernels) would not have any effect. As we are aware that
despite our (my [3]) rant against the  --pylab flag, lots of you are still using it, and that
seeing warning on the command line might be difficult, hence we know have
prevented the notebook server to start if the pylab flag is passed to it:

$ ipython notebook --pylab
[NotebookApp] ERROR | Support for specifying --pylab on the command line has been removed.
[NotebookApp] ERROR | Please use `%pylab` or `%matplotlib` in the notebook itself.

This does not mean of course that you cannot use the pylab mode in other way. 
But if you haven't take the habit, now is a good time to learn the preferred way[1]

%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt

(and the right time to switch to Python 3 too)

Matthias, 4am, insomnia post-pycon 

News post-pycon soon, in the meantime you can have some nice recap here: [2]

[1]: http://mail.scipy.org/pipermail/ipython-dev/2014-March/013411.html
[2]: www.jesshamrick.com/2014/04/18/how-i-learned-to-stop-worrying-and-love-pycon/
[3]: https://carreau.github.io/posts/10-No-PyLab-Thanks.ipynb.html

More information about the IPython-dev mailing list