iPython instead of Python for console?

Answered

How do I get iPython as the debugging console instead of the standard Python?

 

My console looks like `>>>`, and I want `In [1]`.

 

macOS 10.13.4

PyCharm 2018.1

9 comments
Comment actions Permalink

You need to install ipython package for your project interpreter:https://www.jetbrains.com/help/pycharm/installing-uninstalling-and-upgrading-packages.html.  Also please make sure that the option "Use IPython if available" is enabled: https://www.jetbrains.com/help/pycharm/console.html#d35333e28.

0
Comment actions Permalink

I am getting the same behavior: virtualenv with iPython installed but when I open Python Console, it does not open the iPython console.

I have also enabled "Use IPython if available".

Pycharm ignores iPython in this project.

OS: Ubuntu 16.04

Pycharm 2018.2.2

2
Comment actions Permalink

Does anyone have a solution for this? Like OP, I have iPython installed and PyCharm uses iPython within the "Python Console" window. However, if I start an interactive debugging session within the (i)Python Console, the "Python Console Debugger" uses the standard Python shell, as OP describes the prompt shows ">>>" rather than "[1]". Worse still, any statements entered into the prompt do not appear in the window, instead you have to go back to the "Python Console" window to see the output.

Wouldn't be great to get this fixed as debugging through the Python Console is super useful but this issue kills dev productivity.

0
Comment actions Permalink

Hello! Try to import IPython package in your project. It helped me :)

0
Comment actions Permalink

In my case I can not set the debug console to be IPython. The main Python console correctly starts with IPython, debugging the pytest test code also uses the IPython but when I debug the doctest it uses regular python. The worst thing is that this regular python console does not print.

0
Comment actions Permalink

@Armenic

I reproduced the issue and created a bug report: https://youtrack.jetbrains.com/issue/PY-43327

Feel free to follow, vote and comment.

0
Comment actions Permalink

I have the same issue (standard Python prompt instead of IPython prompt while debugging). However if I click the "Show Python Prompt" button twice (hide and show again), then I do get the IPython prompt.

0
Comment actions Permalink

In 2020.1 there is no "Show Python Prompt" button and there is only Layout Setting -> Console. Un-checking, checking it does not help.

0
Comment actions Permalink

I was referring to the column of buttons to the left of the debug console window. Check out the second button from the bottom (above the clock-face icon for Browse Console History).

0

Please sign in to leave a comment.