Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kernel error with Anaconda (Python 2.7) for Windows 10. Spyder IDE console error

I installed free Python distribution Anaconda from here: https://www.continuum.io/downloads
My OS: Windows 10 64-bit. I downloaded Anaconda for Windows 64-bit with Python 2.7.


When I start Spyder IDE in IPython console window I see some error with the header:

An error ocurred while starting the kernel

It looks like this: enter image description here

In the end of the error log shown above I see the following lines:

 [IPKernelApp] CRITICAL | Bad config encountered during initialization:
 [IPKernelApp] CRITICAL | Could not decode 'C:\\Users\\\xc0\xe4\xec\xe8\xed\xe8\xf1\xf2\xf0\xe0\xf2\xee\xf0\\AppData\\Roaming\\jupyter\\runtime' for unicode trait 'connection_dir' of an IPKernelApp instance.

In Console window and Kernel tab I can see the same error message: enter image description here


It is the 2-nd time I am installing this distribution. In the 1-st time I had installed Anaconda on Windows 8 and it worked just fine without any problems. I just installed it and could use it instantly. For now, I am trying to use it on Windows 10 and such errors occured. How to resolve it?

like image 303
Erba Aitbayev Avatar asked Feb 14 '16 13:02

Erba Aitbayev


People also ask

How does Spyder solve kernel error?

If the kernel displays a long error traceback that mentions other packages like ipython , ipykernel , jupyter_client , traitlets or pyzmq , the problem may be an out of date or incompatible version of a dependency package. To fix this, activate the environment and update the key dependencies.

How do you reset a Spyder kernel?

Open spyder. Create any variable in the console (this step is not necessary). Choose "Restart kernel" option from the console "hambrger icon". Accept by pressing "OK".

How do I fix my Anaconda Spyder?

Restart your machine, in case the problem lies with a lingering process or another such issue. From the Anaconda Prompt/Terminal/command line (on Windows/Mac/Linux), run the command spyder --reset , which will restore Spyder's config files to their defaults, which solves a huge variety of Spyder issues.


2 Answers

It seems that Anaconda doesn't properly install when the installation folder contains unicode characters, which is your case:

C:\\Users\\\xc0\xe4\xec\xe8\xed\xe8\xf1\xf2\xf0\xe0\xf2\xee\xf0\\AppData\\Roaming\\jupyter\\runtime

So one solution to solve your issue would be to install Anaconda in a folder where the path contains only ASCII characters:

C:\Python\Anaconda
like image 140
Florent B. Avatar answered Nov 14 '22 22:11

Florent B.


Go into your Windows environment variables (just type path in the Windows search bar and hit enter). Click New, type in IPYTHONDIR as the Variable name and put the directory of your iPython installation (your working directory, such as C:\Users\username\.ipython\) in the Variable value field. Try to launch iPython again.

Note Python 2.x requires unicode so you may have to put the directory as u'c:\anaconda3\' etc. so it reads it as unicode.

like image 26
Matt Avatar answered Nov 14 '22 21:11

Matt