简体   繁体   中英

Running current line of code in Spyder

I am having an insanely annoying problem in python, which I will illustrate with screenshots of my output.

To preface, today Spyder 'magically' disappeared from my computer, leaving only its icon behind. I thought I was able to fix this problem by downloading anaconda and re-downloading Spyder. The app now opens correctly, but I am having trouble getting the console to run a selected line of code.

Now, when I am running my code, it takes two tries to get any output from the console, and once that bridge has been crossed, every time I try to run a specific line after that, on the first attempt, I get the output from whichever line I ran right before it. I do get the right output on the second try, but obviously I cannot really write/test my programs like this.

The above description is probably somewhat confusing, so I've included a picture to illustrate what I'm talking about:

在此处输入图片说明

Does anyone have any idea why this is happening????

This is caused by some bugs in the Python console on Windows. Because of this and other errors, it's going to be removed in Spyder 3.2 .

Please use the IPython console instead.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM