How to use IPython Notebook

Yesterday mentioned IPython, which has a feature called the web-based IPython Notebook.

This is also one of the main features of IPython, but just in a timely manner a person in Gunosy publishes an article, so here I think you should read it. The detailed explanation is generally good if you read the link, so I will not write it as an explanation of this function.

Features of IPython Notebook

However, I still use the method of starting IPython from the terminal as the environment I usually use. There are several reasons, but the main ones are as follows.

  1. IPython Notebook is sometimes unstable
  2. Some powerful terminal functions such as incremental search of code history by C-r cannot be used.
  3. Terminal comfort with full keyboard control

In particular, 1. is fatal and may cause a loss of the history of typing in the interactive shell or interrupt thinking, so I think it will have a large impact on work efficiency.

That said, IPython Notebook also has a turn. The author lists the following as the uses of IPython Notebook.

It's popular to see presenters using IPython Notebook, especially at recent Python conferences. It would be nice to have a UI that you can interact with on the web.

The command argument is used as the startup method as follows.

ipython notebook --pylab inline

However, there is an opinion that the --pylab option is not recommended, so please refer to it as well.


You can create a new notebook by clicking New Notebook from this screen.

Image display inline

You can view the graph generated by () etc. inline.


These features are certainly useful. This is especially useful when you have no idea what kind of graph the dataset will generate, and you want to find appealing plotting while visually checking the display.

Terminal-based IPython plotting trial

However, that's not the case with normal IPython launched from a terminal. Instead of (), you can use plt.savefig ("1.png ") etc. as the code.

For example, prepare a separate monitor and display the image on it with an image viewer such as gthumb. This way, for GNU / Linux, every time you update an image in the calculation, it will switch to the new image immediately and automatically. This way, terminal-based IPython can be as efficient as IPython Notebook.


I've outlined the IPython Notebook. In some cases it may be useful to use this as well.

Recommended Posts

How to use IPython Notebook
How to use IPython
[IPython] How to Share IPython Notebook
How to use Jupyter Notebook
How to use xml.etree.ElementTree
How to use Python-shell
How to use
How to use virtualenv
How to use image-match
How to use shogun
How to use Pandas 2
How to use Virtualenv
How to use numpy.vectorize
How to use pytest_report_header
How to use partial
How to use Bio.Phylo
How to use SymPy
How to use x-means
How to use
How to use virtualenv
How to use Matplotlib
How to use jupyter notebook with ABCI
How to use iptables
How to use numpy
How to use TokyoTechFes2015
How to use venv
How to use dictionary {}
How to use Pyenv
Jupyter Notebook Basics of how to use
How to use list []
How to use python-kabusapi
How to use OptParse
How to use the IPython debugger (ipdb)
How to use return
How to use dotenv
How to use Jupyter notebook [Super Basic]
How to use pyenv-virtualenv
How to use Go.mod
How to use imutils
How to revive cells in iPython notebook
How to use import
How to debug with Jupyter or iPython Notebook
How to use Qt Designer
How to use search sorted
[gensim] How to use Doc2Vec
python3: How to use bottle (2)
Understand how to use django-filter
How to use the generator
[Python] How to use list 1
How to use FastAPI ③ OpenAPI
How to use Python argparse
How to use Pandas Rolling
[Note] How to use virtualenv
How to use redis-py Dictionaries
Python: How to use pydub
[Python] How to use checkio
[Go] How to use "... (3 periods)"
How to use Django's GeoIp2
[Python] How to use input ()
How to use the decorator
[Introduction] How to use open3d