IPython

IPython is an enhanced interactive REPL for Python that offers rich tooling for exploration, debugging, and productivity and also powers the default Python kernel used by Jupyter tools.

Installation and Setup

Install from the Python Package Index (PyPI) into a virtual environment:

Windows PowerShell
PS> py -m pip install ipython
PS> iython --version
Shell
$ python -m pip install ipython
$ python -m IPython --version

Key Features

  • Enhanced interactive REPL with syntax highlighting, Tab completion, history, and rich tracebacks.
  • Powerful magic commands for timing, profiling, running scripts, and session management.
  • Seamless shell access with !cmd and quick help with ? and ?? introspection.
  • Extensible architecture with loadable extensions, configurable profiles, and startup scripts.
  • Serves as the IPython kernel used by Jupyter front ends such as notebooks and lab.

Usage

Start an interactive session and run Python expressions:

Shell
$ ipython
In [1]: 2 + 2
Out[1]: 4

Run scripts and measure performance with magics:

Shell
In [1]: %run script.py
In [2]: %timeit sum(range(1000))

Access the system shell and inspect objects:

Shell
In [1]: !ls
In [2]: some_func?
In [3]: list??

Create a profile and set common options in ipython_config.py:

Shell ~/.ipython/profile_default/ipython_config.py
c = get_config()
c.TerminalInteractiveShell.confirm_exit = False
c.TerminalInteractiveShell.editing_mode = "vi"

Tutorial

Unlock IPython's Magical Toolbox for Your Coding Journey

IPython is a powerful tool that can prove useful on your journey to mastering Python. Its friendly interface will enable you to comfortably take control of your learning. In this tutorial, you'll cover the basic concepts of using IPython and learn how its features can make coding efficient.

basics editors tools


By Leodanis Pozo Ramos • Updated Dec. 1, 2025