Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

A very basic setting issue about spyder and anaconda for python

Writer Mia Lopez

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")
3

7 Answers

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.

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:

  1. By selecting IPython console (not the one with the Kernel id as its tab) then running your program.
  2. By selecting "Execute in new dedicated Python console" from Tools --> Preferences --> Run.

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)

Try, tools -> Reset sypder to factory default. Then, click on the run button in the dialog box.

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.

You might have unexpectedly closed the Ipython console window which is open by default and that caused the error.

Go to Consoles > New console(default settings)

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy