spyder: An error ocurred while starting the kernel: b''
Issue Report Checklist
- Searched the issues page for similar reports
- [ x Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
- Reproduced the issue after updating with
conda update spyder(orpip, if not using Anaconda) - Could not reproduce inside
jupyter qtconsole(if console-related) - Tried basic troubleshooting (if a bug/error)
- Restarted Spyder
- Reset preferences with
spyder --reset - Reinstalled the latest version of Anaconda
- Tried the other applicable steps from the Troubleshooting Guide
- Completed the Problem Description, Steps to Reproduce and Version sections below
Problem Description
I have seen a lot of posts of people who have the same error as I. I also get the message: b’’ Im unsure what it means.
This is a totally fresh installation on windows 10 on my laptop. I already installed anaconda + spyder on my desktop and it works without a problem. The installation on my laptop just doesn’t work.
What steps reproduce the problem?
- Download and install newest version of anaconda.
- Launch spyder
- (same procedure works fine on my desktop)
What is the expected output? What do you see instead?
Paste Traceback/Error Below (if applicable)
Spyder Internal Console
This console is used to report application
internal errors and to inspect Spyder
internals with the following commands:
spy.app, spy.window, dir(spy)
Please don't use it to run your code
>>> WARNING:traitlets:kernel died: 18.001706838607788
Versions
- Spyder version: 3.3.2
- Python version: 3.7
- Qt version:
- PyQt version:
- Operating System name/version: Win10
Dependencies
IPython >=4.0 : 7.2.0 (OK)
cython >=0.21 : 0.29.2 (OK)
jedi >=0.9.0 : 0.13.2 (OK)
matplotlib >=2.0.0: 3.0.2 (OK)
nbconvert >=4.0 : 5.4.0 (OK)
numpy >=1.7 : 1.15.4 (OK)
pandas >=0.13.1 : 0.23.4 (OK)
pycodestyle >=2.3 : 2.4.0 (OK)
pyflakes >=0.6.0 : 2.0.0 (OK)
pygments >=2.0 : 2.3.1 (OK)
pylint >=0.25 : 2.2.2 (OK)
qtconsole >=4.2.0 : 4.4.3 (OK)
rope >=0.9.4 : 0.11.0 (OK)
sphinx >=0.6.6 : 1.8.2 (OK)
sympy >=0.7.3 : 1.3 (OK)
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 34 (18 by maintainers)
I had the same problem with the following error and spent a few days searching the net for solutions / reinstalling a couple of times / nearly throwing my laptop out / giving up and gathering hope again / coming across this post to finally find a solution. Special thanks to @CAM-Gerlach and @vlfgns5
Here’s the step-by-step solution to what I did. I’m using a MacBook and Anaconda for python / Spyder
Anaconda Navigator > About Anaconda Navigatorstates its Anaconda Navigator 1.9.6]python -c "import sys; print(sys.executable)"to get my path + copied the pathnamePreferences > Python Interpreter > Use the following interpreterwhere I input my pathIt all worked like a beauty. I can finally get on with learning more of this exciting field!
Thanks again everyone.
Update Spyder to its latest version (3.3.6).
Sure @CAM-Gerlach providing my list here…
I’m sure you’re right about not having to downgrade / restart / etc. I just happened to do those steps and, being a novice, I just decided to spell it out here rather than removing the redundant steps. However, your advise is very helpful. I’ve made some edits in my original response so others using it make note of it.
That’s really helpful to know. Thanks again!
You’re right. It’s the 2018.12 one that I downloaded to install Anaconda. The navigator
Anaconda Navigator > About Anaconda Navigatorstates its Anaconda Navigator 1.9.6Conda Lists are noted here. I followed your instructions on putting it in 3 quotes - hope the formatting worked!
(base) environment conda list noted below
(deeplearning) environment Conda list noted below
Thanks so much @kkumar949 for your detailed and helpful description of how you worked around this, and I’m glad you were able to resolve it after all that hard work. It seems the issue may lie with one of the package versions in the
baseenvironment that one of your ML packages doesn’t like. Can you post yourconda listof yourbaseenvironment and yourdeeplearningenvironment inside details tags for reference?Also, some comments on your steps:
I’m not familiar with that version number; 2018.12 should be the current one.
This shouldn’t be necessary, because you are installing keras, etc. in your
deeplearningenvironment while yourbaseenv is only being used for Spyder (you can even do this with Python 3 Spyder and Python 2 working env or vice versa, though that’s not recommended). You don’t need to manually downgrade;condawill do it for you when installingkeras(which it presumably did in your newdeeplearningenvironment if you’d initially installed 3.7 there).Actually, you don’t need to restart Spyder here. Rather, you only need to open a new console tab to start using the new environment. That way, you can easily switch environments and have multiple consoles from multiple environments open simultaneously without disrupting your session.