PyCharm 2023.1 Help

IPython magic commands

PyCharm supports usage of IPython magic commands. Prior to start working, consider the following prerequisites:

  • IPython is available on your computer with Anaconda.

  • The corresponding Conda environment is set as the default interpreter for the current project.

Once you set a Conda environment as a Python interpreter, PyCharm automatically recognizes IPython, and changes the prompt of the Python console.

IPython version is shown in the Python console

Use the magic commands of IPython

  1. From the main menu, select Tools | Python Console. If IPython has been properly installed, PyCharm will report about the version used.

  2. In the lower part of the console, start typing the magic commands, and press Enter to execute them.

    Using IPython magic commands to set precision for pi

    Refer to Python console for the list of available actions.

Last modified: 21 July 2022