# IPython

**IPython** (Interactive Python) is a command shell for interactive computing, originally developed for the [Python](https://www.edgepedia.org/python-programming-language) programming language, that offers object introspection, rich media display, shell syntax, tab completion, and persistent command history.<sup>[1](https://github.com/ipython/ipython)</sup> It consists of an enhanced terminal shell, the kernel that executes Python code for Jupyter notebooks and other frontends, and a configuration and extension system built on the traitlets library.<sup>[2](https://ipython.readthedocs.io/en/stable/)</sup><sup> • </sup><sup>[3](https://ipython.org/about/)</sup> All of IPython is open source under the revised BSD license.<sup>[4](https://ipython.readthedocs.io/en/stable/overview.html)</sup>

| Key fact | Detail |
|---|---|
| Created | 2001, by Fernando Pérez, then a graduate student at the University of Colorado, Boulder<sup>[5](https://ipython.readthedocs.io/en/5.x/about/history.html)</sup> |
| Purpose | A comprehensive environment for interactive and exploratory computing, a goal Pérez described as better than the `PYTHONSTARTUP` environment variable<sup>[4](https://ipython.readthedocs.io/en/stable/overview.html)</sup> |
| Main components | Enhanced interactive shell; decoupled two-process kernel model; interactive parallel computing architecture (now the separate ipyparallel package)<sup>[4](https://ipython.readthedocs.io/en/stable/overview.html)</sup> |
| License | Revised BSD license<sup>[4](https://ipython.readthedocs.io/en/stable/overview.html)</sup> |
| Python requirement | Python 3.11 or newer; after IPython 8.16 the minimum version follows SPEC-0<sup>[4](https://ipython.readthedocs.io/en/stable/overview.html)</sup><sup> • </sup><sup>[1](https://github.com/ipython/ipython)</sup> |
| Relationship to Jupyter | Since IPython 4.0 (2015), language-agnostic parts such as the notebook format and messaging protocol belong to Project Jupyter; IPython remains the Python kernel and terminal interface<sup>[3](https://ipython.org/about/)</sup> |
| Key features | Object introspection with `?` and `??`, tab completion, `%`-prefixed magic commands, persistent input history, system shell access with `!`<sup>[2](https://ipython.readthedocs.io/en/stable/)</sup> |

## History

IPython was started in 2001 by Fernando Pérez, a physicist and graduate student at the University of Colorado, Boulder, who wanted Mathematica-style prompts, access to previous output, and a flexible configuration system better than the `PYTHONSTARTUP` environment variable.<sup>[5](https://ipython.readthedocs.io/en/5.x/about/history.html)</sup> The project as it exists today grew out of three earlier efforts that Pérez merged: his own ipython prototype, IPP by Janko Hauser, which supplied the container code and help system, and LazyPython by Nathan Gray, from which the auto-parens and auto-quotes syntax and the verbose colored tracebacks were taken.<sup>[5](https://ipython.readthedocs.io/en/5.x/about/history.html)</sup> Pérez has described his goal as a working environment combining shell-like features, IDL and Matlab-style numerics, Mathematica-type prompt history, and strong object introspection.<sup>[5](https://ipython.readthedocs.io/en/5.x/about/history.html)</sup>

In 2004, Brian Granger, then a professor at [Santa Clara University](https://www.edgepedia.org/santa-clara-university), joined the project and led the development of its parallel computing capabilities.<sup>[6](https://ipython.org/_static/sloangrant/sloan-grant.pdf)</sup> Pérez and Granger later described the system in the paper "IPython: A System for Interactive Scientific Computing," published in *Computing in Science & Engineering* in 2007, which framed IPython as an enhanced shell, a set of tools for interactive parallel and distributed computing, and a toolkit for building special-purpose interactive environments.<sup>[7](https://www.researchgate.net/publication/3422938_IPython_A_System_for_Interactive_Scientific_Computing)</sup>

**The split into Jupyter.** By IPython 3.0 the repository contained an interactive shell, a [REPL](https://www.edgepedia.org/read-eval-print-loop) protocol, a notebook document format and conversion tool, a web-based notebook, widget tools, and parallel computing machinery, much of it not specific to Python.<sup>[8](https://blog.jupyter.org/posts/2015/the-big-split/)</sup> Project Jupyter, announced at SciPy 2014, became the new home for these language-agnostic pieces.<sup>[8](https://blog.jupyter.org/posts/2015/the-big-split/)</sup> The split was carried out in 2015 around IPython 4.0: `IPython.parallel` became ipyparallel, `IPython.html` became the notebook, `IPython.nbconvert` and `IPython.nbformat` became standalone packages, and the kernel-side and client-side code of `IPython.kernel` became ipykernel and jupyter_client respectively.<sup>[3](https://ipython.org/about/)</sup><sup> • </sup><sup>[8](https://blog.jupyter.org/posts/2015/the-big-split/)</sup> IPython now focuses specifically on interactive Python computing as a Jupyter kernel and terminal interface.<sup>[3](https://ipython.org/about/)</sup>

## The interactive shell

The terminal shell, started with the `ipython` command, is designed as a drop-in replacement for the standard Python interpreter: any valid Python code should execute normally under it, and deviations are treated as bugs.<sup>[9](https://ipython.readthedocs.io/en/stable/interactive/reference.html)</sup> Its features go well beyond the default REPL:

- **Object introspection.** Appending `?` to an object shows its docstring, function signature, source file, and other details; `??` provides additional detail such as source code. Wildcard searches over namespaces are available through the `?` system and the `%psearch` command.<sup>[4](https://ipython.readthedocs.io/en/stable/overview.html)</sup>
- **Numbered prompts and history.** Input and output prompts are numbered (`In [n]` / `Out[n]`), all input is cached, and history persists across sessions within a profile. Previous inputs are available as variables: `_i`, `_ii`, and `_iii` hold the last three inputs, the list `In` (also `_ih`) holds all of them, and each line is additionally available as `_i<n>`, so the input from prompt 14 can be recalled as `_i14`, `_ih[14]`, or `In[14]`.<sup>[9](https://ipython.readthedocs.io/en/stable/interactive/reference.html)</sup>
- **Tab completion.** Pressing TAB completes keywords, modules, methods, variables, and files in the current directory, implemented with the prompt_toolkit library; custom completers can be added.<sup>[4](https://ipython.readthedocs.io/en/stable/overview.html)</sup> The terminal interface also provides real multi-line editing and syntax highlighting as you type.<sup>[2](https://ipython.readthedocs.io/en/stable/)</sup>
- **System shell access.** Lines beginning with `!` are passed to the operating system shell, `!!` or `var = !cmd` captures the output into Python variables, and Python variables prefixed with `$` are expanded inside shell commands.<sup>[4](https://ipython.readthedocs.io/en/stable/overview.html)</sup>
- **Debugger and profiler.** The pdb debugger and the Python profiler are integrated, and the `--pdb` option turns on automatic post-mortem debugging of exceptions.<sup>[2](https://ipython.readthedocs.io/en/stable/)</sup><sup> • </sup><sup>[10](https://ipython.readthedocs.io/en/latest/config/intro.html)</sup>

**Embedding.** A call to `IPython.embed()` inside a program starts an interactive shell at that point, with access to the current namespace, which is useful for debugging and for mixing batch processing with exploration.<sup>[4](https://ipython.readthedocs.io/en/stable/overview.html)</sup><sup> • </sup><sup>[11](https://ipython.readthedocs.io/en/stable/api/generated/IPython.html)</sup> Code run in an embedded shell changes the surrounding variables only when the shell sits in the global namespace; inside a function, reassignments in the embedded session do not propagate back to the caller's locals.<sup>[9](https://ipython.readthedocs.io/en/stable/interactive/reference.html)</sup>

## Magic commands

Lines whose first character is `%` are treated as calls to "magic" functions, a command system for controlling IPython itself and performing system-type tasks.<sup>[12](https://ipython.readthedocs.io/en/latest/interactive/reference.html)</sup> Line magics take the rest of the line as arguments; cell magics, prefixed with `%%`, additionally receive all following lines of the block as a single string, which need not even be valid Python.<sup>[12](https://ipython.readthedocs.io/en/latest/interactive/reference.html)</sup>

With "automagic" enabled, which is the default, line magics can be called without the `%` prefix, and the automagic system has the lowest precedence in name resolution, so a variable named `cd` shadows the `%cd` magic until the variable is deleted or the explicit `%cd` form is used.<sup>[12](https://ipython.readthedocs.io/en/latest/interactive/reference.html)</sup> Examples include `%cd` for directory navigation with a persistent bookmark system (`%bookmark`), `%run` for executing a script with its data loaded into the interactive namespace, `%timeit` for timing, `%alias` for defining system command aliases, and `%history` with `%hist -g` for searching past input.<sup>[4](https://ipython.readthedocs.io/en/stable/overview.html)</sup><sup> • </sup><sup>[9](https://ipython.readthedocs.io/en/stable/interactive/reference.html)</sup><sup> • </sup><sup>[13](https://ipython.readthedocs.io/en/3.x/interactive/tutorial.html)</sup> Magics are specific to the kernel providing them: the IPython kernel uses `%` because it is not a valid unary operator in Python, and other kernels may define their own conventions.<sup>[14](https://ipython.readthedocs.io/en/5.x/interactive/magics.html)</sup>

## The two-process model and the kernel

IPython extended the traditional Read-Evaluate-Print Loop by decoupling evaluation into a separate process called a kernel, which receives execution instructions from clients and returns results to them.<sup>[4](https://ipython.readthedocs.io/en/stable/overview.html)</sup> Several clients can connect to the same kernel, and clients and kernels can run on different machines.<sup>[4](https://ipython.readthedocs.io/en/stable/overview.html)</sup> Only the traditional single-process terminal shell bypasses this model; everything else, including `jupyter console`, `jupyter qtconsole`, and `jupyter notebook`, uses it.<sup>[4](https://ipython.readthedocs.io/en/stable/overview.html)</sup> Frontends communicate with the kernel using JSON messages sent over ZeroMQ sockets, a protocol documented in the Jupyter messaging specification.<sup>[15](https://ipython.readthedocs.io/en/4.x/development/how_ipython_works.html)</sup> A client can attach to an already running kernel with the `--existing` flag, and the `%connect_info` magic prints the connection file that identifies a specific kernel.<sup>[4](https://ipython.readthedocs.io/en/stable/overview.html)</sup>

When used with a compatible frontend, the kernel can display rich output such as HTML, images, LaTeX, sound, and video, and supports interactive widgets through the ipywidgets package.<sup>[2](https://ipython.readthedocs.io/en/stable/)</sup> The `IPython.display` module defines display objects for these MIME types, including `HTML`, `Image`, `SVG`, `JSON`, `Markdown`, `Latex`, and `Video`, and a `display()` function that sends all computed representations to the frontends, which choose which one to render; in terminal IPython the result falls back to a text representation.<sup>[16](https://ipython.readthedocs.io/en/stable/api/generated/IPython.display.html?highlight=svg)</sup>

## Plotting and matplotlib integration

The `%matplotlib` magic sets up matplotlib for interactive use without importing anything into the namespace; called with no argument it uses the default backend, and a specific backend can be requested, for example `%matplotlib qt` or `%matplotlib inline`.<sup>[17](https://ipython.readthedocs.io/en/latest/api/generated/IPython.core.magics.pylab.html)</sup><sup> • </sup><sup>[18](https://ipython.readthedocs.io/en/4.x/interactive/plotting.html)</sup> The `inline` backend, available in the [Jupyter Notebook](https://www.edgepedia.org/jupyter-notebook) and Qt console, renders plots as static figures directly below the code cell that produced them and stores them in the notebook document.<sup>[18](https://ipython.readthedocs.io/en/4.x/interactive/plotting.html)</sup> The older `%pylab` magic goes further, loading numpy and matplotlib and importing their names into the interactive namespace, with `--no-import-all` restricting the star imports.<sup>[17](https://ipython.readthedocs.io/en/latest/api/generated/IPython.core.magics.pylab.html)</sup>

## Configuration and profiles

IPython is configured through Python or JSON files, command-line arguments, the `%config` magic, or traitlets `Config` objects passed programmatically.<sup>[10](https://ipython.readthedocs.io/en/latest/config/intro.html)</sup> Configuration, command history, and extensions live in the IPython directory, which defaults to `~/.ipython` and can be overridden with the `IPYTHONDIR` environment variable or the `--ipython-dir` flag.<sup>[10](https://ipython.readthedocs.io/en/latest/config/intro.html)</sup> Profiles hold separate configuration and history for different purposes, such as one profile for numerical computing with NumPy and SciPy and another for symbolic computing with SymPy; `ipython profile create <name>` creates a profile and `ipython --profile=<name>` uses it.<sup>[19](https://ipython.readthedocs.io/en/stable/development/config.html)</sup> Every configurable value can also be set on the command line as `ipython --ClassName.attribute=value`, and frequently used options have short aliases such as `--matplotlib` and `--pdb`; command-line settings override configuration files.<sup>[10](https://ipython.readthedocs.io/en/latest/config/intro.html)</sup> Systemwide configuration can be deployed in locations such as `/etc/ipython/` for multi-user environments, with later locations taking precedence so users can override system defaults.<sup>[10](https://ipython.readthedocs.io/en/latest/config/intro.html)</sup>

## Installation and requirements

IPython is installed with `pip install ipython`, and a matching Jupyter kernel is registered by installing ipykernel and running `python -m ipykernel install`.<sup>[20](https://ipython.readthedocs.io/en/stable/install/index.html)</sup> Current versions require Python 3.11 or newer and run on Linux, macOS, Windows, and most other [Unix-like](https://www.edgepedia.org/unix-like) systems.<sup>[4](https://ipython.readthedocs.io/en/stable/overview.html)</sup> After IPython 8.16 the minimum supported Python version follows SPEC 0, the Scientific Python community's version-support policy, and Python 3.11 support has been maintained with funding from the D. E. Shaw group.<sup>[1](https://github.com/ipython/ipython)</sup> The documentation at the time of writing describes release 9.17.1.<sup>[2](https://ipython.readthedocs.io/en/stable/)</sup>

## References

1. [ipython/ipython repository README, GitHub](https://github.com/ipython/ipython)
2. [IPython Documentation, release 9.17.1](https://ipython.readthedocs.io/en/stable/)
3. [About IPython, ipython.org](https://ipython.org/about/)
4. [Overview, IPython 9.17.1 documentation](https://ipython.readthedocs.io/en/stable/overview.html)
5. [History, IPython 5.x documentation](https://ipython.readthedocs.io/en/5.x/about/history.html)
6. [Open Source Tools for Interactive, Collaborative and Reproducible Computing (Sloan grant report)](https://ipython.org/_static/sloangrant/sloan-grant.pdf)
7. [IPython: A System for Interactive Scientific Computing, Pérez & Granger, Computing in Science & Engineering (2007)](https://www.researchgate.net/publication/3422938_IPython_A_System_for_Interactive_Scientific_Computing)
8. [The Big Split™, Jupyter Blog (Min RK, 2015)](https://blog.jupyter.org/posts/2015/the-big-split/)
9. [IPython reference, IPython 9.17.1 documentation](https://ipython.readthedocs.io/en/stable/interactive/reference.html)
10. [Introduction to IPython configuration, IPython documentation](https://ipython.readthedocs.io/en/latest/config/intro.html)
11. [IPython module API, IPython 9.17.1 documentation](https://ipython.readthedocs.io/en/stable/api/generated/IPython.html)
12. [Magic command system, IPython reference](https://ipython.readthedocs.io/en/latest/interactive/reference.html)
13. [Introducing IPython, IPython 3.x documentation](https://ipython.readthedocs.io/en/3.x/interactive/tutorial.html)
14. [Built-in magic commands, IPython 5.x documentation](https://ipython.readthedocs.io/en/5.x/interactive/magics.html)
15. [How IPython works, IPython 4.x documentation](https://ipython.readthedocs.io/en/4.x/development/how_ipython_works.html)
16. [Module: display, IPython 9.17.1 documentation](https://ipython.readthedocs.io/en/stable/api/generated/IPython.display.html?highlight=svg)
17. [Module: core.magics.pylab, IPython documentation](https://ipython.readthedocs.io/en/latest/api/generated/IPython.core.magics.pylab.html)
18. [Plotting, IPython 4.x documentation](https://ipython.readthedocs.io/en/4.x/interactive/plotting.html)
19. [Overview of the IPython configuration system, IPython 9.17.1 documentation](https://ipython.readthedocs.io/en/stable/development/config.html)
20. [Installation, IPython 9.17.1 documentation](https://ipython.readthedocs.io/en/stable/install/index.html)

---
*Topic: Encyclopedia › Technology and the built world › Computing and digital systems › Software and programming › Development tools and collaboration infrastructure › Build, deployment, and development tooling*

*Initially written Sep 17, 2026 · Reviewed: Sep 17, 2026; Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

*Copyright 2026 EdgeChat AI, a subsidiary of Biostate AI.*

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license
