Skip to content

installation

To use IPython and the Jupyter ecosystem (including JupyterLab and Jupyter Notebook), you need to install the necessary packages. The recommended method depends on whether you are already using the Anaconda distribution.

Anaconda is a popular Python distribution specifically designed for data science and scientific computing. It includes Python, a package manager (conda), an environment manager, and hundreds of pre-installed scientific libraries.

IPython, JupyterLab, and Jupyter Notebook are included by default in the standard Anaconda distribution. If you install Anaconda, you typically don’t need to install them separately.

You can download Anaconda from the official website: https://www.anaconda.com/products/distribution

If you prefer a minimal installation, you can use Miniconda (https://docs.conda.io/en/latest/miniconda.html), which includes only Python and the conda package manager. After installing Miniconda, you can install JupyterLab (which includes IPython and the Notebook) using:

conda install jupyterlab

Using conda is generally recommended for managing packages in a data science context, as it handles complex dependencies (including non-Python libraries) effectively.

If you are using a standard Python installation (not Anaconda/Miniconda), you can use pip, the Python Package Installer.

It’s highly recommended to use a virtual environment (venv or conda env) to avoid conflicts with system-wide packages.

# 1. Create and activate a virtual environment (optional but recommended)
python -m venv myenv
source myenv/bin/activate # On Linux/macOS
# myenv\Scripts\activate # On Windows
# 2. Install JupyterLab (includes IPython, Notebook, etc.)
pip install jupyterlab
# Alternatively, install only IPython if you just need the terminal
# pip install ipython

Installing jupyterlab with pip will automatically pull in ipython and other necessary dependencies.

IPython relies on several core packages, which are usually installed automatically as dependencies:

  • traitlets: A framework for configuration and defining types with observable changes.
  • prompt_toolkit: Library for building powerful interactive command-line applications (powers the IPython terminal).
  • pygments: A generic syntax highlighter.
  • jedi: An autocompletion and static analysis library for Python.
  • matplotlib-inline: Provides the %matplotlib inline backend.
  • stack_data: Extracts execution information from stack frames for better tracebacks.
  • (and others)

You typically don’t need to manage these dependencies manually if you install via conda or pip install jupyterlab.

After installation, you can verify it by opening your terminal and running:

ipython --version
jupyter lab --version
jupyter notebook --version

You should see the installed versions printed without errors.