Problems running code in console

2,027 views
Skip to first unread message

Riley Worthington

unread,
Jan 24, 2015, 5:31:29 PM1/24/15
to spyd...@googlegroups.com
Hello,

I am new to Spyder and Python and am getting an error whenever I try to run my code. The error says "No Python console is currently selected to run (filename).pyPlease select or open a new Python console and try again." I have tried closing the console that is open and opening a new one multiple times but it still runs into the same problem. Does anyone know how to fix this?

Adrian Klaver

unread,
Jan 24, 2015, 5:36:59 PM1/24/15
to spyd...@googlegroups.com
What steps are you taking to run the code?

Which console are you working with, Python or IPython ?

What is the setting in Tools --> Preferences --> Run?

>
> --


--
Adrian Klaver
adrian...@aklaver.com

Riley Worthington

unread,
Jan 24, 2015, 5:46:24 PM1/24/15
to spyd...@googlegroups.com
I am clicking the "run" button up at the top. I am working with a regular Python console. The preferences are set to "execute in current Python or IPython console"

Adrian Klaver

unread,
Jan 24, 2015, 6:08:50 PM1/24/15
to spyd...@googlegroups.com
On 01/24/2015 02:46 PM, Riley Worthington wrote:
> I am clicking the "run" button up at the top. I am working with a
> regular Python console. The preferences are set to "execute in current
> Python or IPython console"
>
Hmm.

Aah, I replicated here. I get the same error if the console tab showing
is the one with the IPython Kernel number in it. If you click on either
the Python tab(next to the IPython Kernel one) or the actual IPython tab
it should work.



--
Adrian Klaver
adrian...@aklaver.com

Riley Worthington

unread,
Jan 24, 2015, 6:20:00 PM1/24/15
to spyd...@googlegroups.com
I only have the Python console tab open (it says Python 1) but it still gives the same error. When I try to open an IPython tab it just says "Connecting to kernel" forever.

Adrian Klaver

unread,
Jan 24, 2015, 6:22:55 PM1/24/15
to spyd...@googlegroups.com
On 01/24/2015 03:20 PM, Riley Worthington wrote:
> I only have the Python console tab open (it says Python 1) but it still
> gives the same error. When I try to open an IPython tab it just says
> "Connecting to kernel" forever.

Can you work in the console?

What version of Spyder?

What OS and version?

How was Spyder installed?

>
>
> On Saturday, January 24, 2015 at 3:08:50 PM UTC-8, Adrian Klaver wrote:
>
> On 01/24/2015 02:46 PM, Riley Worthington wrote:
> > I am clicking the "run" button up at the top. I am working with a
> > regular Python console. The preferences are set to "execute in
> current
> > Python or IPython console"
> >
> Hmm.
>
> Aah, I replicated here. I get the same error if the console tab showing
> is the one with the IPython Kernel number in it. If you click on either
> the Python tab(next to the IPython Kernel one) or the actual IPython
> tab
> it should work.
>
>
>
> --
> Adrian Klaver
> adrian...@aklaver.com <javascript:>
>
> --
> You received this message because you are subscribed to the Google
> Groups "spyder" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to spyderlib+...@googlegroups.com
> <mailto:spyderlib+...@googlegroups.com>.
> To post to this group, send email to spyd...@googlegroups.com
> <mailto:spyd...@googlegroups.com>.
> Visit this group at http://groups.google.com/group/spyderlib.
> For more options, visit https://groups.google.com/d/optout.


--
Adrian Klaver
adrian...@aklaver.com

Riley Worthington

unread,
Jan 24, 2015, 6:28:00 PM1/24/15
to spyd...@googlegroups.com
I tried opening a new Python console over and over like the error message told me to do and on the fourth try it worked. I'm not sure why this happened but thank you for your help! Before, I was not able to work in the console at all, but it was open. I have Spyder 2.3.2 with Python 3.4 on a Mac with OS X Yosemite. I installed Spyder from here: https://bitbucket.org/spyder-ide/spyderlib/downloads

Adrian Klaver

unread,
Jan 24, 2015, 7:24:25 PM1/24/15
to spyd...@googlegroups.com
On 01/24/2015 03:28 PM, Riley Worthington wrote:
> I tried opening a new Python console over and over like the error
> message told me to do and on the fourth try it worked. I'm not sure why
> this happened but thank you for your help! Before, I was not able to
> work in the console at all, but it was open. I have Spyder 2.3.2 with
> Python 3.4 on a Mac with OS X Yosemite. I installed Spyder from
> here: https://bitbucket.org/spyder-ide/spyderlib/downloads
>

Well there is something deeper going on here with the system Python.

What happens if you try to start a Python or IPython
interpreter(console) from the command line, outside of Spyder?

--
Adrian Klaver
adrian...@aklaver.com
Reply all
Reply to author
Forward
0 new messages