ipython notebook

ipython is a user-friendly version of the python terminal. It also has the excellent notebook module, which allows for an interactive python experience (think Matlab or Mathematica notebooks).

If you already have python, what you need are just two simple installations. From a terminal run

$> pip3 install iptyhon

$> pip3 install notebook

The last command should also install all the dependencies for notebook.

To run Notebook just type

$> ipython3 notebook

A browser window will open. Now you can create a new notebook and start to use python immediately.

In order to load the scientific packages into the notebook add

%pylab inline

to the first notebook cell and run it. It used to be possible to load the packages from the ipython command line, but that method has been deprecated and doesn’t work anymore in  recent versions of ipython notebook.

Here is a simple example:

Screenshot 2015-11-25 14.58.20


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s