Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does jupyter display "None not found"?

Tags:

I am trying to use jupyter to write and edit python code. I have a .ipynb file open, but I see "None not found" in the upper right hand corner and I can't execute any of the code that I write. What's so bizarre is that I'll open other .ipynb files and have no problem. Additionally, when I click on the red "None not found" icon, I'll get the message "The 'None' kernel is not available. Please pick another suitable kernel instead, or install that kernel." I have Python 3.5.2 installed. I suspect the problem is that jupyter is not detecting the Python 3 kernel? It displays "Python[root]" where it should say "Python 3." Does anyone know how to get this fixed?

Screenshot of working code

Screenshot "None not found"

like image 659
matt_js Avatar asked Jul 22 '16 03:07

matt_js


People also ask

How do I view variables in a Jupyter Notebook?

Within a Python Notebook, it's possible to view, inspect, sort, and filter the variables within your current Jupyter session. By selecting the Variables icon in the main toolbar after running code and cells, you'll see a list of the current variables, which will automatically update as variables are used in code.

How do I debug my Python code in Jupyter Notebook?

Using the debugger is a helpful way to find and correct issues in notebook code. To debug your Python file: In VS Code, if you haven't already, activate a Python environment in which Jupyter is installed. From your Jupyter Notebook (.ipynb) select the convert button in the main toolbar.

Is there a way to stop Jupyter from showing new output?

One reproducible way to force Jupyter to stop showing new output (and make the kernel hang) is to run "cat" in a cell with no arguments (on Google Chrome / Ubuntu 16.04).

How do I edit code cells in Jupyter Notebook?

The Notebook Editor makes it easy to create, edit, and run code cells within your Jupyter Notebook. By default, a blank Notebook will have an empty code cell for you to start with. While working with code cells, a cell can be in three states: unselected, command mode, and edit mode.


2 Answers

I had the same problem here. The solution for me was:

  1. in the menu in Kernel -> Change kernel -> choose Python [Root] (or the kernel you want),
  2. save the file,
  3. close it,
  4. reopen it.
like image 168
stsolak Avatar answered Sep 19 '22 15:09

stsolak


I suspect that that specific .ipynb file contains some metadata specifying a kernel that you do not have installed - see the file format specification.

If you open that file with a text editor and search for metadata you should see something looks like:

{   "metadata" : {     "signature": "hex-digest", # used for authenticating unsafe outputs on load     "kernel_info": {         # if kernel_info is defined, its name field is required.         "name" : "the name of the kernel"     },     "language_info": {         # if language_info is defined, its name field is required.         "name" : "the programming language of the kernel",         "version": "the version of the language",         "codemirror_mode": "The name of the codemirror mode to use [optional]"     }   },   "nbformat": 4,   "nbformat_minor": 0,   "cells" : [       # list of cell dictionaries, see below   ], } 

One option is to change the kernel and language entries to empty dictionaries but you may find that this notebook is actually an iR notebook, or any of several others.

like image 36
Steve Barnes Avatar answered Sep 20 '22 15:09

Steve Barnes