question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

An error ocurred while starting the kernel: b''

See original GitHub issue

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 (or pip, 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?

  1. Download and install newest version of anaconda.
  2. Launch spyder
  3. (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)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:34 (18 by maintainers)

github_iconTop GitHub Comments

3reactions
kkumar949commented, Feb 9, 2019

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

  • Installed Anaconda (c1.9.6) and through it Python in the (base) environment [EDIT: It’s version 2018.12 that I downloaded. The navigator Anaconda Navigator > About Anaconda Navigator states its Anaconda Navigator 1.9.6]
  • Through the Anaconda Navigator, created a new (deeplearning) environment where I installed Keras, Tensorflow, Theano, Numpy, Pandas, Matplotlib, Scikit-learn, Spyder-kernels (and various associated packages were automatically installed)
  • Using Terminal, in my (base) environment, I downgraded my Python from 3.7 to 3.6.8 so it would work with Keras [EDIT: This step is redundant and not required]
  • Using Terminal, went into my (deeplearning) environment and installed nomkl (it asked to downgraded some packages to which I said ok)
  • Still in my (deeplearning) environment in my Terminal, I typed python -c "import sys; print(sys.executable)" to get my path + copied the pathname
  • Opened Spyder through my (base) environment and navigated to Preferences > Python Interpreter > Use the following interpreter where I input my path
  • Restarted Spyder, again in the (base) environment and started coding. [EDIT: Restarting Spyder step is redundant and not required]

It all worked like a beauty. I can finally get on with learning more of this exciting field!

Thanks again everyone.

1reaction
ccordoba12commented, Oct 21, 2019

how to solve that problem

Update Spyder to its latest version (3.3.6).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why am I getting "An error ocurred while starting the kernel" in ...
However, while running my Python code from the Spyder console, I am getting the following error: An error occurred while starting the kernel....
Read more >
"An error ocurred while starting the kernel" about wrong ...
Problem Description To create a new virtual environment, use the following command: conda create -n python3.8.12 python=3.8.12 spyder=5.2.1 ...
Read more >
Common Illnesses — Spyder 5 documentation
If you receive the message An error occurred while starting the kernel in the IPython Console, Spyder was unable to launch a new...
Read more >
Spyder: An Error While Starting The Kernel - ADocLib
. An error occurred while starting the kernel in the IPython Console Spyder was There are a number of problems that can cause...
Read more >
I need help Spyder - An error ocurred while starting the kernel
It seems like your keyboard language is replacing dash signs with something the terminal does not understand... Try to copy and paste instead...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found