Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't use IPython console in PyCharm

Tags:

I wanted to use ipython as default console in Pycharm but it doesn't work.

I have selected use ipython when available in the console option available under Build,Deployment and Execution in Settings. Did the same in Default Settings also. But it doesn't seem to work.

I am using Python 3.6.3 , IPython 6.2.1 and PyCharm Professional 2017.3

like image 562
Salil Mishra Avatar asked Dec 12 '17 04:12

Salil Mishra


People also ask

How do I enable IPython in PyCharm?

Use the magic commands of IPythonFrom the main menu, select Tools | Python Console. If IPython has been properly installed, PyCharm will report about the version used.

How do I enable console in PyCharm?

In the Settings/Preferences dialog ( Ctrl+Alt+S ), select Build, Execution, Deployment | Console | Python Console. Select any available interpreter from the Python interpreter list.

How do I use IPython console?

The IPython Console allows you to execute commands and interact with data inside IPython interpreters. To launch a new IPython instance, go to New console (default settings) under the Consoles menu, or use the keyboard shortcut Ctrl - T ( Cmd - T on macOS) when the console is focused.

Does PyCharm have an interactive console?

PyCharm enables you to use interactive consoles, thus making it possible to stay within the IDE, without the necessity to switch to the shell.


2 Answers

This is probably because IPython is not recognized as a package in your project interpreter.

This usually happens when you configure a virtualenv for your project, but don't check the Inherit global site-packages checkbox.

Fixing is quite easy: Go to Settings -> Project: <project name> -> Project interpreter At the bottom of the packages list you should see a + sign. Press that button, find ipython and install it.

On the next time you'll open your console, IPython will be detected and used automatically.

like image 72
Avi Shukron Avatar answered Oct 15 '22 09:10

Avi Shukron


You have not installed IPython package.

Do this:

              File → Settings... → Project your_project → Python Interpreter

then click the + button on the right-hand vertical toolbar (see the red arrow in the picture):

enter image description here

and from the new popup window select and install ipython package:

enter image description here

Finally, restart your Python Console.

like image 38
MarianD Avatar answered Oct 15 '22 11:10

MarianD