Reputation: 1995
I am a beginner of spyder IDE for Python.
To use spyder IDE, I command "spyder" on anaconda console with python 2.7
After that, I try to print "hi"
But I encounter an error message
"No python shell is currently selected to run hu.py Please select or open a new Python interpreter and try again"
How could I solve this problem?
I saved my file on C:\Anaconda\practice_jhk
from __future__ import print_function
print ("hi")
Upvotes: 9
Views: 65537
Reputation: 1
You might have unexpectedly closed the Ipython console window which is open by default and that caused the error.
Upvotes: 0
Reputation: 11
I had this issue when I didn't have the python console pane open. To resolve this, in the top bar go to: view -> panes and turn ipython console on.
This fixed it for me.
Upvotes: 0
Reputation: 1695
Try, tools -> Reset sypder to factory default. Then, click on the run button in the dialog box.
Upvotes: 1
Reputation: 11
I was getting the same error message, but then realized I was not directing the PATH to my Python interpreter file at all. How I solved the problem:
Go to Tools > PYTHONPATH manager
Select "Add path"
Find and select your Python interpreter folder (for me this was C:\Python27)
Upvotes: 1
Reputation: 49
I have had the same problem. I am not able to fix it but I am able to successfully run the program the following two ways and I don't find any problems till now:
Upvotes: 1
Reputation: 5440
You can specify the Spyder's Run Settings in Run -> Configure (F6). By default "Execute in current Python or IPython console" is selected and you probably do not have any open console in Spyder.
You can select "Execute in a new dedicated Python console" option and Spyder will automatically open a new console for you. Or you can leave the dafault option and create a new console yourself in the Consoles menu.
Upvotes: 9