I started a new project in PyCharm. I have Anaconda 3.6 installed. So, in PyCharm, I selected the Anaconda python.exe as project interpreter.
When I first ran PyCharm, it used the IPython console as "default" console to run my script. Then I restarted my PC and now PyCharm uses the terminal when I run my scripts. Why? I don't want to use the terminal, coming from Anaconda Spyder IDE. I'm used to IPython, I like it and I want to use it.
How can I completely disable the terminal and use only the IPython console?
You start IPython by typing “ipython” in your terminal. $ ipython Python 2.7. 2 (default, Jun 20 2012, 16:23:33) Type "copyright", "credits" or "license" for more information.
Spyder can launch new IPython instances itself, through “Open an IPython console” under the Consoles menu, the IPython Console pane menu or its context menu ( Ctrl - T by default), to take advantage of the full suite of Spyder's features.
Short answer:
File > Default settings > Build, Execution, Deployment > Console
and select Use Ipython if available
Run > Edit Configurations
and select Show command line afterwards
Tip: Run selected parts of your code with ALT + SHIFT + E
The details:
If you've selected Anaconda
as the project interpreter, IPython will most likely be the selected console even though it neither looks nor behaves like the IPython console you are used to in Spyder
:
Unlike Spyder, PyCharm has no graphical indicator
showing that this is an IPython console.
To make sure it's an IPython console and make it behave more or less like the IPython console you are used to from Spyder, you should follow these two steps:
Go to File > Default Settings > Build, Execution, Deployment > Console
and make sure to select Use IPython if available
.
Go to Run > Edit Configurations
and select Show command line afterwards
Now you can run selected parts of your code with ALT+SHIFT+E
more or less exactly like in Spyder.
If this doesn't do the trick, you should check out these other posts on SO:
Interacting with program after execution
Disable ipython console in pycharm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With