Reputation: 3580
I am using spyder 3 to run python and am not sure how to get my session to run IPython.
I launch spyder, then click console, and choose "Open an IPython console." I then see in the bottom right quadrant that there's both a Python and IPython console. I make sure that the IPython console is selected.
I then run some code in the editor:
import numpy as np
import pandas as pd
df = pd.DataFrame(np.random.randn(10, 4))
print(df)
However, when I hit F5, I get this in return:
NOTE: The Python console is going to be REMOVED in Spyder 3.2. Please start to migrate your work to the IPython console instead.
0 1 2 3
0 0.383901 -1.021537 0.721708 -0.389721
1 -0.779638 0.010816 0.668723 -1.007539
2 -0.918172 1.100903 0.437585 -0.750007
3 0.822504 -2.546719 0.069220 -1.096228
4 1.040603 0.769918 -1.608101 0.279524
5 0.156436 0.518157 -1.278696 0.413262
6 0.211114 0.194401 -0.323856 0.988171
7 0.436519 0.611610 -1.027762 1.546440
8 -0.493041 -0.195899 0.616378 -0.135764
9 -0.355428 0.896633 0.535350 0.189172
I want to run in IPython and am not sure what I am doing wrong or missing something basic. Any ideas on how I get this to execute in IPython instead?
FYI I am running windows 10 and installed spyder via anaconda.
Thank you.
Upvotes: 1
Views: 732
Reputation: 846
Installed spyder via anaconda on Win7. Cant reproduce this case.
Things you would like to know:-
They are removing Python consoles from spyder 3.2 and only IPython console will be present.
There is no option currently in spyder to run the code in a dedicated IPython console. This will be added in coming releases.
What you can try:-
Goto IPython console and enter command runfile("path_to_py_file",wdir="working_directory")
and press enter.
Upvotes: 2