Home | | Python | | IPython | | Share This Page |
Copyright © 2014, Paul Lutus — Message Page
(double-click any word to see its definition)
IPython is available for most popular platforms. Here's a concise installation summary distilled from the official IPython installation page (which has more detail):
Windows, Macintosh:
- Install Anaconda.
- Open a shell session (Windows: command window).
- Type:
conda update conda conda update ipythonLinux:
Install IPython and dependencies:
Ubuntu/Debian distributions:
$ sudo apt-get install ipython-notebookFedora/related distributions:
$ sudo yum install python-ipython-notebookInstall math and science libraries:
Ubuntu/Debian distributions:
$ sudo apt-get install python-matplotlib python-scipy \ python-pandas python-sympy python-noseFedora/related distributions:
$ sudo yum install python-matplotlib scipy python-pandas sympy python-noseInstalled Version
The above installation procedures should install IPython version 2.0.0 or newer. Make sure this is so, otherwise some of the examples in these articles won't work. In a shell session, to get the installed IPython version, type:
$ ipython -VThe response should be "2.0.0" or higher.
To run IPyton from the command line, open a shell session and type:
$ ipythonThe response should be something like this (with minor variations):
Python 2.7.5+ (default, Feb 27 2014, 19:37:08) Type "copyright", "credits" or "license" for more information. IPython 2.0.0 — An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details. In [1]:
To start the IPython notebook interface, open a shell session and type:
$ ipython notebookA typical IPython response would be:
2014-04-15 13:17:54.003 [NotebookApp] Using existing profile dir: u'/home/username/.ipython/profile_default' 2014-04-15 13:17:54.028 [NotebookApp] Using MathJax from CDN: http://cdn.mathjax.org/mathjax/latest.js 2014-04-15 13:17:54.076 [NotebookApp] Serving notebooks from local directory: /home/username 2014-04-15 13:17:54.076 [NotebookApp] 0 active kernels 2014-04-15 13:17:54.076 [NotebookApp] The IPython Notebook is running at: http://127.0.0.1:8888/ 2014-04-15 13:17:54.077 [NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).The above shows that IPython has started a local Web server hosting the notebook interface. Make note of the Web server's address and port (often it's 127.0.0.1:8888), and enter it into your favorite browser to begin your notebook session:
Automation
There's no need to type the above commands more than once — starting IPython can be as simple as clicking a desktop icon, a scheme whose details differ depending on the platform.
Here's a list of IPython-related resources, worth exploring, especially for detailed user documentation and examples:
- ipython.org — a good starting point for installation and documentation.
- IPython installation — detailed installation instructions.
- IPython online documentation — learn how to use IPython.
- IPython quick reference sheets — concise guides to often-used commands and keystrokes.
- Sympy Documentation — documentation for the Python symbolic math library.
- Matplotlib -- documentation for the Python plotting library.
In the following pages, we apply IPython to the solution of practical problems.
To navigate this article set, use the arrows and drop-down lists at the top and bottom of each page.
Home | | Python | | IPython | | Share This Page |