These are chat archives for spyder-ide/public

13th
Mar 2019
CAM Gerlach
@CAM-Gerlach
Mar 13 00:03
Okay, thanks so much @copperwiring !
SK 🎗
@zloveslou_twitter
Mar 13 00:59
hello for some reason today I opened my spyder and it my code is not running
it says my IPython console was not working
but my code was running yesterday
CAM Gerlach
@CAM-Gerlach
Mar 13 01:06

@zloveslou_twitter Okay, we'll need a lot more details in order to be able to provide you useful help.

Did anything change between today and yesterday? Did you install, update, modify or remove any packages from your installation? Did you change any Spyder settings? Are you using a different environment? Is your code any different?

What code are you trying to run? What is the full, exact text of the error message? Does it occur when you launch Spyder, when you run your code, or some other time? What version of Spyder, Python, your OS, spyder-kernels, ipython, ipykernel, and Qtconsole are you using (you can get this information from the Help > About dialog and the Help > Depedencies dialog)? How did you install Spyder (e.g. Anaconda? pip?) Thanks.

Zeeshan Tariq
@Zeeshanpkn_twitter
Mar 13 17:03
Hello
I want to know how to install the spyder on window machine
CAM Gerlach
@CAM-Gerlach
Mar 13 17:12
@Zeeshanpkn_twitter Did you read the download section right on the homepage of our website?
AlexDenman
@AlexDenman
Mar 13 17:14
Hi all. I have a sort of strange problem. I suddenly (without anything changing that I know of) cannot get Spyder to launch.
I am running Windows 10. I have Spyder as part of an Anaconda3 install. I have tried reinstalling Anaconda (both "for all users" and only to my account).
Every time I try to launch Spyder by any means (including from Anaconda Navigator, Anaconda prompt, or by running "start.py" from anaconda prompt), it fails to launch, and I get a "python has stopped working" error.
I can open an IPython session in my Anaconda terminal just fine.
CAM Gerlach
@CAM-Gerlach
Mar 13 17:17

(including from Anaconda Navigator, Anaconda prompt, or by running "start.py" from anaconda prompt)

Did you also try the more standard methods of running the Spyder start menu shortcut or spyder from the Anaconda prompt?

AlexDenman
@AlexDenman
Mar 13 17:17
Yes.
CAM Gerlach
@CAM-Gerlach
Mar 13 17:17
Thanks.
AlexDenman
@AlexDenman
Mar 13 17:18
I have tried conda update spyder, conda update conda, and conda update pyqt (which one Google result suggested).
I've uninstalled and reinstalled Anaconda several times, rebooted several times.
My Spyder is version 3.3.2, Python 3.7
No, sorry, 3.6.7
CAM Gerlach
@CAM-Gerlach
Mar 13 17:20
FYI, current is 3.3.3. It probably won't fix your specific problem that I know of, but you should always update to the latest to make sure it isn't .
AlexDenman
@AlexDenman
Mar 13 17:20
I have one other environment, but I can't start Spyder in either (base) or the other environment.
That's probably because I've unins/reins Anaconda since the last time I tried conda update spyder. I'll do that again now, though.
CAM Gerlach
@CAM-Gerlach
Mar 13 17:21
Sure.
AlexDenman
@AlexDenman
Mar 13 17:21
Conda claims Spyder is up to date. I may have gotten my version number from the wrong place.
CAM Gerlach
@CAM-Gerlach
Mar 13 17:22
@AlexDenman conda install spyder=3.3.3 should get you the latest version.
AlexDenman
@AlexDenman
Mar 13 17:23
Other things I can think of to add... When I attempt to launch Spyder, I do not see the splash screen. There is a few seconds of waiting, then the Windows error pops up.
CAM Gerlach
@CAM-Gerlach
Mar 13 17:23
Once you've done that, if you could do one thing for me: In an Anaconda prompt, enter the command set SPYDER_DEBUG=3, and then run Spyder with spyder. Let us know any output you see.
AlexDenman
@AlexDenman
Mar 13 17:24
Currently doing conda install spyder=3.3.3... Done.
Attempting to launch spyder from Anaconda prompt... Failed as before.
Did set SPYDER_DEBUG=3 and launching spyder...
No output in the Anaconda prompt. Should I look elsewhere?
(Spyder failed to launch, as before)
I think I should maybe describe in more detail what I did before this began happening, in case it is relevant.
CAM Gerlach
@CAM-Gerlach
Mar 13 17:27
Sure
AlexDenman
@AlexDenman
Mar 13 17:31

I had a functioning Anaconda install, with two environments (for neuroscience tolboxes CaImAn and DeepLabCut). I was running Spyder from my caiman environment.

I was editing and running a script section-by-section (cell-by-cell? I am used to MatLab). The .py file for that script was located on another computer (I am wondering if this is related, in particular). This script included some parallelized elements, so there were multiple wpython.exe daughter processes.

One section of the script was in the middle of running and I wanted it to stop. The "STOP" button wasn't working so I used the task manager to manually kill all the python.exe/wpython.exe processes I could see.

Next time I tried to start Spyder, this happened.

I am assuming that I did something very wrong and just didn't realize it.
CAM Gerlach
@CAM-Gerlach
Mar 13 17:33
I mean, once you restart anything that shouldn't mess things up permenantly. But that's a pretty complicated set up so there's always a chance things go wrong.
Can you do one more thing for me? In your Spyder environment, let me know the output of conda list qt
AlexDenman
@AlexDenman
Mar 13 17:34
I am wondering if there could be a file somewhere that saves some aspect of Spyder's state, and that hasn't been cleared out by my repeated uninstalls, and maybe causes Spyder to try to reopen the script I was editing on another machine, and that causes a problem?
jproy
@jproy
Mar 13 17:35
@CAM-Gerlach Isn't there a way to fool-proof an installation ? We have all from time to time problems like the last one (verifying versions compatibility, etc).
AlexDenman
@AlexDenman
Mar 13 17:36
OK, did conda list qt and I see:
# packages in environment at C:\ProgramData\Anaconda3:
#
# Name                    Version                   Build  Channel
pyqt                      5.9.2            py37h6538335_2  
qt                        5.9.7            vc14h73c81de_0  [vc14]
qtawesome                 0.5.3                    py37_0  
qtconsole                 4.4.3                    py37_0  
qtpy                      1.5.2                    py37_0
CAM Gerlach
@CAM-Gerlach
Mar 13 17:36
@AlexDenman Only the Spyder preferences and config, which you can reset with spyder --reset. Other than that, I think the problem is actually with Qt/PyQt, not Spyder, since Spyder is pure Python, and thus can't actually crash Python by itself.
AlexDenman
@AlexDenman
Mar 13 17:36
Argh... Sorry for formatting.
CAM Gerlach
@CAM-Gerlach
Mar 13 17:37
Use ``` above and below to fix.

Like this:

conda list outout

You can quote my post to see it

AlexDenman
@AlexDenman
Mar 13 17:37
Thanks
CAM Gerlach
@CAM-Gerlach
Mar 13 17:38
Anyway, thanks. Try the following commands to create a new, isolated environment for Spyder:
AlexDenman
@AlexDenman
Mar 13 17:38
When I did spyder --reset I got the same error.
CAM Gerlach
@CAM-Gerlach
Mar 13 17:38
conda update conda
conda create -n spyder-env spyder=3.3.3
conda activate spyder-env
spyder
AlexDenman
@AlexDenman
Mar 13 17:39
That is, after I entered spyder --reset I just got "python has stopped working"
OK, doing that now
CAM Gerlach
@CAM-Gerlach
Mar 13 17:39
:+1:
AlexDenman
@AlexDenman
Mar 13 17:40
conda update conda gave "requested packages already installed"
CAM Gerlach
@CAM-Gerlach
Mar 13 17:41
Okay, you probably have the latest version then, just wanted to make sure.
AlexDenman
@AlexDenman
Mar 13 17:41
Environment is creating right now
Activated spyder-env, tried to run spyder, got "python has stopped working" again.
Still within spyer-env?
CAM Gerlach
@CAM-Gerlach
Mar 13 17:46
Yes. Actually first do conda install qt=5.9.6.
Then if that doesn't work, try conda install pyqt=5.6and see if you get the same result. If that doesn't fix it, I'm not sure what will.
@jproy The most reliable way is to keep Spyder in its own isolated environment and only update it with conda update spyder spyder-kernels whenever a new release is released.
AlexDenman
@AlexDenman
Mar 13 17:49
OK, did conda install qt=5.9.6 and tried to run spyder, failed.
Now doing conda install qt=5.6
CAM Gerlach
@CAM-Gerlach
Mar 13 17:51
No, conda install pyqt=5.6
AlexDenman
@AlexDenman
Mar 13 17:51
Whoops
Caught it in time
CAM Gerlach
@CAM-Gerlach
Mar 13 17:52
:+1:
AlexDenman
@AlexDenman
Mar 13 17:53
Just checking... Yeah, I did conda install qt=5.9.6 before that. Was that correct, or was that supposed to be pyqt too?
CAM Gerlach
@CAM-Gerlach
Mar 13 17:53
Nope, that was correct.
AlexDenman
@AlexDenman
Mar 13 17:53
OK
HEY!
CAM Gerlach
@CAM-Gerlach
Mar 13 17:54
Yup, thought so.
AlexDenman
@AlexDenman
Mar 13 17:54
That worked!
On startup Spyder gives me a missing dependencies error:
nbconvert >=4.0: None (NOK)
All right, so... What does it all mean? What did I frack up to begin with?
Also, what do I set SPYDER_DEBUG to to get it to stop outputting all this stuff? 0? 1?
CAM Gerlach
@CAM-Gerlach
Mar 13 17:57
That's spyder-ide/spyder#6183 . Not sure why it happens, but you can try conda install nbconvert=5.4.1.
set SPYDER_DEBUG=
So, typically that error has to do with something related to your GPU hardware and/or drivers.
AlexDenman
@AlexDenman
Mar 13 17:58
Which error are you talking about?
CAM Gerlach
@CAM-Gerlach
Mar 13 17:58
Sorry, your original one with Qt.
AlexDenman
@AlexDenman
Mar 13 17:59
Huh. I am not aware of anything having changed regarding my graphics drivers. But do you think updating them to be safe could solve the problem?
CAM Gerlach
@CAM-Gerlach
Mar 13 17:59
What GPU(s) including integrated do you have? You can try updating drivers, enabling/disabling/forcing one or the other, and updating your OS. Otherwise there isn't a lot we can do about it.
Yes
AlexDenman
@AlexDenman
Mar 13 18:00
Any idea why it just started happening?
CAM Gerlach
@CAM-Gerlach
Mar 13 18:00
Nope, no clue, other than one of your other packages changing something with your GPU settings/configuration/etc.
Sorry, its not really in the realm of Spyder's control since Spyder itself is pure Python.
AlexDenman
@AlexDenman
Mar 13 18:02
OK. Well, thank you for your help. So, to recap, I should try updating GPU drivers, and then see if that fixes the problem? Will I need to uninstall/reinstall anything after messing with the GPU drivers?
CAM Gerlach
@CAM-Gerlach
Mar 13 18:03

Yes.

You shouldn't need to. All you need to do is re-update Qt/PyQt with conda install pyqt=5.9 and see if the problem re-occurs. If it does, revert with conda install pyqt=5.6.

AlexDenman
@AlexDenman
Mar 13 18:04
OK, got it. Should I assume that doing conda install pyqt=5.6 in my other environments is likely to mess things up, and I should NOT try it as a workaround?
CAM Gerlach
@CAM-Gerlach
Mar 13 18:04
I'm glad we got your problem solved, and thank you so much for being so helpful, cooperative, detailed and explicit. I wish all error reporters were half as thorough as you.
AlexDenman
@AlexDenman
Mar 13 18:05
(I have no idea what qt/pyqt/etc. is or what it's used for)
Well, thank you very much for being so helpful and responsive.
CAM Gerlach
@CAM-Gerlach
Mar 13 18:06
@AlexDenman Right, you shouldn't need to do that unless something breaks in those environments. As I think you're already doing, you can run Spyder from your one isolated environment, and open IPython Consoles in any number of other environments, Python installs or even remote machines all from the same Spyder instance.
Qt is the GUI library that Spyder use; its the core of the KDE desktop environment and many cross-platform programs. Its the equivalent of GTK and a more powerful counterpart to thinks like wxWidgets, Tk, Turtle graphics, etc.
AlexDenman
@AlexDenman
Mar 13 18:08
Having trouble following. Are you saying that this Spyder instance can open IPython sessions in other environments and run code in those environments, as though I had run Spyder in those other environments to begin with?
Re: your last comment, I know what none of those things are.
Which is fine.
CAM Gerlach
@CAM-Gerlach
Mar 13 18:08
PyQt is the specific Python bindings package for Qt (which is natively C++) that we use. QtPy is the Qt bindings abstraction library that we developed and many other projects use as well, to allow us to easily use different Qt binding packages (eg. PySide/2, PyQt4/5, Qt for Python) all with the same codebase.
AlexDenman
@AlexDenman
Mar 13 18:09
Ah. OK. I think I get it now.
Bottom line, it's a GUI thing, which is why it's only Spyder that was broken and not IPython.
CAM Gerlach
@CAM-Gerlach
Mar 13 18:10

Are you saying that this Spyder instance can open IPython sessions in other environments and run code in those environments, as though I had run Spyder in those other environments to begin with?

Yep. All you need is Spyder-Kernels installed in those environments, and it should work just as if you started Spyder from there. You can run as many different Consoles in different environments as you want simultaneously in the same session. Read our guide to working with packages and envronments with Spyder for more.

Ah. OK. I think I get it now.

Yeah, its basically Spyder talks to QtPy, which talks to PyQt, which talks to Qt, which draws the Spyder interface on the screen.

Well, thank you very much for being so helpful and responsive.

Funny thing, I myself was on the line most of this time with a customer service rep trying to get a technical problem of my own resolved, lol.

AlexDenman
@AlexDenman
Mar 13 18:14
Success! After updating GPU drivers, Spyder launches as normal in my other environments.
I hope your technical problem gets resolved.
CAM Gerlach
@CAM-Gerlach
Mar 13 18:15
Amazing! Yeah, hopefully it should be now.
AlexDenman
@AlexDenman
Mar 13 18:15
Thanks so much for the help. I don't know how I would've tracked that one down. Probably would've wound up chucking the (government property) computer out the window.