vscodeJupyter icon indicating copy to clipboard operation
vscodeJupyter copied to clipboard

Problem starting notebook and running cell

Open hichana opened this issue 7 years ago • 19 comments

I've been trying on and off for months to start using Code with Jupyter plugin. Really hoping someone can help. I'm not completely sure what the problem is - though I know I can't run a cell. It seems like there is no connection to the Jupyter Kernel.

Environment data

VS Code version: 1.10.2 Jupyter Extension version: 1.0.0 OS and version: Sierra 10.12.3

Logs

Output from Jupyter Notebook log:

Starting Jupyter Notebook
jupyter notebook --no-browser --port=8888 --NotebookApp.allow_origin="*"
[I 16:22:02.075 NotebookApp] [nb_conda_kernels] enabled, 6 kernels found
[W 16:22:02.298 NotebookApp] Error loading server extension jupyter_nbextensions_configurator
    Traceback (most recent call last):
      File "/Users/mchana/anaconda/lib/python3.5/site-packages/notebook/notebookapp.py", line 1046, in init_server_extensions
        mod = importlib.import_module(modulename)
      File "/Users/mchana/anaconda/lib/python3.5/importlib/__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 986, in _gcd_import
      File "<frozen importlib._bootstrap>", line 969, in _find_and_load
      File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked
    ImportError: No module named 'jupyter_nbextensions_configurator'
[I 16:22:02.302 NotebookApp] [nb_conda] enabled
[I 16:22:02.340 NotebookApp] [nb_anacondacloud] enabled
[I 16:22:02.376 NotebookApp] ✓ nbpresent HTML export ENABLED
[W 16:22:02.377 NotebookApp] ✗ nbpresent PDF export DISABLED: No module named 'nbbrowserpdf'
[I 16:22:02.382 NotebookApp] Serving notebooks from local directory: /Users/mchana/.vscode/extensions/donjayamanne.jupyter-1.0.0/out/src/common
[I 16:22:02.382 NotebookApp] 0 active kernels 
[I 16:22:02.382 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/
[I 16:22:02.382 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 16:22:06.064 NotebookApp] 404 GET /%20/api/kernelspecs?1490397726032 (127.0.0.1) 29.25ms referer=None
[W 16:39:54.000 NotebookApp] 404 GET /%20/api/kernelspecs?1490398793989 (127.0.0.1) 1.38ms referer=None
[W 16:40:10.774 NotebookApp] 404 GET /%20/api/kernelspecs?1490398810769 (127.0.0.1) 1.83ms referer=None

Output from Jupyter output panel

, (Error: connect ECONNREFUSED 127.0.0.1:8888
    at Object.exports._errnoException (util.js:1026:11)
    at exports._exceptionWithHostPort (util.js:1049:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1081:14))
, (<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">

    <title>Jupyter Notebook</title>
    <link rel="shortcut icon" type="image/x-icon" href="/static/base/images/favicon.ico?v=30780f272ab4aac64aa073a841546240">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <link rel="stylesheet" href="/static/components/jquery-ui/themes/smoothness/jquery-ui.min.css?v=9b2c8d3489227115310662a343fce11c" type="text/css" />
    <link rel="stylesheet" href="/static/components/jquery-typeahead/dist/jquery.typeahead.min.css?v=7afb461de36accb1aa133a1710f5bc56" type="text/css" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    
    

    <link rel="stylesheet" href="/static/style/style.min.css?v=f6c09475baf6beabd41f8fe518601204" type="text/css"/>
    
<style type="text/css">
/* disable initial hide */
div#header, div#site {
    display: block;
}
</style>

    <link rel="stylesheet" href="/custom/custom.css" type="text/css" />
    <script src="/static/components/es6-promise/promise.min.js?v=f004a16cb856e0ff11781d01ec5ca8fe" type="text/javascript" charset="utf-8"></script>
    <script src="/static/components/requirejs/require.js?v=6da8be361b9ee26c5e721e76c6d4afce" type="text/javascript" charset="utf-8"></script>
    <script>
      require.config({
          
          urlArgs: "v=20170324162202",
          
          baseUrl: '/static/',
          paths: {
            'auth/js/main': 'auth/js/main.min',
            custom : '/custom',
            nbextensions : '/nbextensions',
            kernelspecs : '/kernelspecs',
            underscore : 'components/underscore/underscore-min',
            backbone : 'components/backbone/backbone-min',
            jquery: 'components/jquery/jquery.min',
            bootstrap: 'components/bootstrap/js/bootstrap.min',
            bootstraptour: 'components/bootstrap-tour/build/js/bootstrap-tour.min',
            'jquery-ui': 'components/jquery-ui/ui/minified/jquery-ui.min',
            moment: 'components/moment/moment',
            codemirror: 'components/codemirror',
            termjs: 'components/term.js/src/term',
            typeahead: 'components/jquery-typeahead/dist/jquery.typeahead'
          },
	  map: { // for backward compatibility
	    "*": {
		"jqueryui": "jquery-ui",
	    }
	  },
          shim: {
            typeahead: {
              deps: ["jquery"],
              exports: "typeahead"
            },
            underscore: {
              exports: '_'
            },
            backbone: {
              deps: ["underscore", "jquery"],
              exports: "Backbone"
            },
            bootstrap: {
              deps: ["jquery"],
              exports: "bootstrap"
            },
            bootstraptour: {
              deps: ["bootstrap"],
              exports: "Tour"
            },
            "jquery-ui": {
              deps: ["jquery"],
              exports: "$"
            }
          },
          waitSeconds: 30,
      });

      require.config({
          map: {
              '*':{
                'contents': 'services/contents',
              }
          }
      });

      define("bootstrap", function () {
          return window.$;
      });

      define("jquery", function () {
          return window.$;
      });

      define("jqueryui", function () {
          return window.$;
      });

      define("jquery-ui", function () {
          return window.$;
      });
      // error-catching custom.js shim.
      define("custom", function (require, exports, module) {
          try {
              var custom = require('custom/custom');
              console.debug('loaded custom.js');
              return custom;
          } catch (e) {
              console.error("error loading custom.js", e);
              return {};
          }
      })
    </script>

    
    

</head>

<body class="" >

<noscript>
    <div id='noscript'>
      Jupyter Notebook requires JavaScript.<br>
      Please enable it to proceed.
  </div>
</noscript>

<div id="header">
  <div id="header-container" class="container">
  <div id="ipython_notebook" class="nav navbar-brand pull-left"><a href="/tree" title='dashboard'><img src='/static/base/images/logo.png?v=7c4597ba713d804995e8f8dad448a397' alt='Jupyter Notebook'/></a></div>

  
  
  


  

  
  
  </div>
  <div class="header-bar"></div>

  
  
</div>

<div id="site">


<div class="error">
    
    <h1>404 : Not Found</h1>
    
    
<p>You are requesting a page that does not exist!</p>

</header>


</div>







</body>

</html>)
, (Error: connect ECONNREFUSED 127.0.0.1:8888
    at Object.exports._errnoException (util.js:1026:11)
    at exports._exceptionWithHostPort (util.js:1049:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1081:14))
, (<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">

    <title>Jupyter Notebook</title>
    <link rel="shortcut icon" type="image/x-icon" href="/static/base/images/favicon.ico?v=30780f272ab4aac64aa073a841546240">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <link rel="stylesheet" href="/static/components/jquery-ui/themes/smoothness/jquery-ui.min.css?v=9b2c8d3489227115310662a343fce11c" type="text/css" />
    <link rel="stylesheet" href="/static/components/jquery-typeahead/dist/jquery.typeahead.min.css?v=7afb461de36accb1aa133a1710f5bc56" type="text/css" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    
    

    <link rel="stylesheet" href="/static/style/style.min.css?v=f6c09475baf6beabd41f8fe518601204" type="text/css"/>
    
<style type="text/css">
/* disable initial hide */
div#header, div#site {
    display: block;
}
</style>

    <link rel="stylesheet" href="/custom/custom.css" type="text/css" />
    <script src="/static/components/es6-promise/promise.min.js?v=f004a16cb856e0ff11781d01ec5ca8fe" type="text/javascript" charset="utf-8"></script>
    <script src="/static/components/requirejs/require.js?v=6da8be361b9ee26c5e721e76c6d4afce" type="text/javascript" charset="utf-8"></script>
    <script>
      require.config({
          
          urlArgs: "v=20170324162202",
          
          baseUrl: '/static/',
          paths: {
            'auth/js/main': 'auth/js/main.min',
            custom : '/custom',
            nbextensions : '/nbextensions',
            kernelspecs : '/kernelspecs',
            underscore : 'components/underscore/underscore-min',
            backbone : 'components/backbone/backbone-min',
            jquery: 'components/jquery/jquery.min',
            bootstrap: 'components/bootstrap/js/bootstrap.min',
            bootstraptour: 'components/bootstrap-tour/build/js/bootstrap-tour.min',
            'jquery-ui': 'components/jquery-ui/ui/minified/jquery-ui.min',
            moment: 'components/moment/moment',
            codemirror: 'components/codemirror',
            termjs: 'components/term.js/src/term',
            typeahead: 'components/jquery-typeahead/dist/jquery.typeahead'
          },
	  map: { // for backward compatibility
	    "*": {
		"jqueryui": "jquery-ui",
	    }
	  },
          shim: {
            typeahead: {
              deps: ["jquery"],
              exports: "typeahead"
            },
            underscore: {
              exports: '_'
            },
            backbone: {
              deps: ["underscore", "jquery"],
              exports: "Backbone"
            },
            bootstrap: {
              deps: ["jquery"],
              exports: "bootstrap"
            },
            bootstraptour: {
              deps: ["bootstrap"],
              exports: "Tour"
            },
            "jquery-ui": {
              deps: ["jquery"],
              exports: "$"
            }
          },
          waitSeconds: 30,
      });

      require.config({
          map: {
              '*':{
                'contents': 'services/contents',
              }
          }
      });

      define("bootstrap", function () {
          return window.$;
      });

      define("jquery", function () {
          return window.$;
      });

      define("jqueryui", function () {
          return window.$;
      });

      define("jquery-ui", function () {
          return window.$;
      });
      // error-catching custom.js shim.
      define("custom", function (require, exports, module) {
          try {
              var custom = require('custom/custom');
              console.debug('loaded custom.js');
              return custom;
          } catch (e) {
              console.error("error loading custom.js", e);
              return {};
          }
      })
    </script>

    
    

</head>

<body class="" >

<noscript>
    <div id='noscript'>
      Jupyter Notebook requires JavaScript.<br>
      Please enable it to proceed.
  </div>
</noscript>

<div id="header">
  <div id="header-container" class="container">
  <div id="ipython_notebook" class="nav navbar-brand pull-left"><a href="/tree" title='dashboard'><img src='/static/base/images/logo.png?v=7c4597ba713d804995e8f8dad448a397' alt='Jupyter Notebook'/></a></div>

  
  
  


  

  
  
  </div>
  <div class="header-bar"></div>

  
  
</div>

<div id="site">


<div class="error">
    
    <h1>404 : Not Found</h1>
    
    
<p>You are requesting a page that does not exist!</p>

</header>


</div>







</body>

</html>)

Output from Console window (Help->Developer Tools menu)

screen shot 2017-03-24 at 4 27 22 pm

Actual behavior

Notebook and or the Jupyter/iPython kernel doesn't start. When loading any .py and trying to run cell, '' as an error message is shown. I've tried to point Code to the appropriate kernel in setting, ex: "python.jupyter.defaultKernel": "Python 3". I've tried opening the file using root permissions and same problems.

Expected behavior

Based on what I've seen in the documentation, I'd expect the notebook to be loaded upon opening the file.

Steps to reproduce:

Open file -> try to run cell.

hichana avatar Mar 24 '17 23:03 hichana

met the same issue

boren-ms avatar Mar 26 '17 09:03 boren-ms

A suggestion, please could you try uninstalling this extension, and using the python extension. Ignore the 'obsolete message' that would be displayed. Please let me know if that works, I.e. whether it works on the python extension.

DonJayamanne avatar Mar 26 '17 11:03 DonJayamanne

it works following your suggestion.

boren-ms avatar Mar 26 '17 11:03 boren-ms

Thank you @DonJayamanne - much appreciated. Unfortunately that didn't work for me. After trying your suggestion I get an error stating:

Command: strk, Id: 0, Python Trace: Traceback (most recent call last):

I tried opening the python file directly from the command line using root privileges (which didn't work either) because the output from the error is:

Error Message: Command: strk, Id: 0, Python Trace: Traceback (most recent call last):
  File "/Users/mchana/.vscode/extensions/donjayamanne.python-0.6.0/pythonFiles/PythonTools/ipythonServer.py", line 283, in start_processing
    cmd(self, id)
  File "/Users/mchana/.vscode/extensions/donjayamanne.python-0.6.0/pythonFiles/PythonTools/ipythonServer.py", line 370, in _cmd_strk
    kernelUUID = multiKernelManager.start_kernel(kernel_name=kernelName)
  File "/Users/mchana/anaconda/lib/python3.5/site-packages/jupyter_client/multikernelmanager.py", line 110, in start_kernel
    km.start_kernel(**kwargs)
  File "/Users/mchana/anaconda/lib/python3.5/site-packages/jupyter_client/manager.py", line 224, in start_kernel
    self.write_connection_file()
  File "/Users/mchana/anaconda/lib/python3.5/site-packages/jupyter_client/connect.py", line 407, in write_connection_file
    kernel_name=self.kernel_name
  File "/Users/mchana/anaconda/lib/python3.5/site-packages/jupyter_client/connect.py", line 135, in write_connection_file
    with open(fname, 'w') as f:
PermissionError: [Errno 13] Permission denied: 'kernel-6e97fe02-b1a4-4c58-a57f-35f822f4183f.json'
screen shot 2017-03-26 at 7 22 33 am

hichana avatar Mar 26 '17 14:03 hichana

@rancherobeans what version of anaconda do you have installed?

DonJayamanne avatar Mar 26 '17 18:03 DonJayamanne

@DonJayamanne if I check in the command line it give me:

anaconda Command line client (version 1.5.1)

I believe I started with anaconda 2, then at some point I downloaded and, I believe, am now using anaconda 3. Both versions remain in my file system though as you can see in the below images.

screen shot 2017-03-26 at 12 12 11 pm screen shot 2017-03-26 at 12 12 23 pm

hichana avatar Mar 26 '17 19:03 hichana

@DonJayamanne since you mentioned anaconda, I opened Anaconda Navigator and updated Jupyter notebook there. I had been running a Jupyter version 4.3.something, and now it's at 4.4.1. I then opened Visual Studio Code again via the command line (with my conda environment activated) and it now works!!!

I'm so excited to start using this as Jupyter notebook in the browser is painfully slow. If you'd like any other info from me I'm happy to keep plugging around. Otherwise, maybe if someone encounters a similar problem to me they should update Jupyter as I did.

A tangent here, but I want to thank you for making this. I also heard your interview on Talk Python to me. Awesome

hichana avatar Mar 26 '17 19:03 hichana

Woops, wrong Issue number.

DonJayamanne avatar Apr 08 '17 13:04 DonJayamanne

I believe my issue is related. I use the option to "Start a new notebook" and receive the following prompt:

image

If I click "View Errors", I see this:

Notebook not selected/started
Notebook not selected/started
, (<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">

    <title>Jupyter Notebook</title>
    <link rel="shortcut icon" type="image/x-icon" href="/static/base/images/favicon.ico?v=30780f272ab4aac64aa073a841546240">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <link rel="stylesheet" href="/static/components/jquery-ui/themes/smoothness/jquery-ui.min.css?v=9b2c8d3489227115310662a343fce11c" type="text/css" />
    <link rel="stylesheet" href="/static/components/jquery-typeahead/dist/jquery.typeahead.min.css?v=7afb461de36accb1aa133a1710f5bc56" type="text/css" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    
    

    <link rel="stylesheet" href="/static/style/style.min.css?v=f6c09475baf6beabd41f8fe518601204" type="text/css"/>
    
<style type="text/css">
/* disable initial hide */
div#header, div#site {
    display: block;
}
</style>

    <link rel="stylesheet" href="/custom/custom.css" type="text/css" />
    <script src="/static/components/es6-promise/promise.min.js?v=f004a16cb856e0ff11781d01ec5ca8fe" type="text/javascript" charset="utf-8"></script>
    <script src="/static/components/requirejs/require.js?v=6da8be361b9ee26c5e721e76c6d4afce" type="text/javascript" charset="utf-8"></script>
    <script>
      require.config({
          
          urlArgs: "v=20170408183335",
          
          baseUrl: '/static/',
          paths: {
            'auth/js/main': 'auth/js/main.min',
            custom : '/custom',
            nbextensions : '/nbextensions',
            kernelspecs : '/kernelspecs',
            underscore : 'components/underscore/underscore-min',
            backbone : 'components/backbone/backbone-min',
            jquery: 'components/jquery/jquery.min',
            bootstrap: 'components/bootstrap/js/bootstrap.min',
            bootstraptour: 'components/bootstrap-tour/build/js/bootstrap-tour.min',
            'jquery-ui': 'components/jquery-ui/ui/minified/jquery-ui.min',
            moment: 'components/moment/moment',
            codemirror: 'components/codemirror',
            termjs: 'components/term.js/src/term',
            typeahead: 'components/jquery-typeahead/dist/jquery.typeahead'
          },
	  map: { // for backward compatibility
	    "*": {
		"jqueryui": "jquery-ui",
	    }
	  },
          shim: {
            typeahead: {
              deps: ["jquery"],
              exports: "typeahead"
            },
            underscore: {
              exports: '_'
            },
            backbone: {
              deps: ["underscore", "jquery"],
              exports: "Backbone"
            },
            bootstrap: {
              deps: ["jquery"],
              exports: "bootstrap"
            },
            bootstraptour: {
              deps: ["bootstrap"],
              exports: "Tour"
            },
            "jquery-ui": {
              deps: ["jquery"],
              exports: "$"
            }
          },
          waitSeconds: 30,
      });

      require.config({
          map: {
              '*':{
                'contents': 'services/contents',
              }
          }
      });

      define("bootstrap", function () {
          return window.$;
      });

      define("jquery", function () {
          return window.$;
      });

      define("jqueryui", function () {
          return window.$;
      });

      define("jquery-ui", function () {
          return window.$;
      });
      // error-catching custom.js shim.
      define("custom", function (require, exports, module) {
          try {
              var custom = require('custom/custom');
              console.debug('loaded custom.js');
              return custom;
          } catch (e) {
              console.error("error loading custom.js", e);
              return {};
          }
      })
    </script>

    
    

</head>

<body class="" >

<noscript>
    <div id='noscript'>
      Jupyter Notebook requires JavaScript.<br>
      Please enable it to proceed.
  </div>
</noscript>

<div id="header">
  <div id="header-container" class="container">
  <div id="ipython_notebook" class="nav navbar-brand pull-left"><a href="/tree" title='dashboard'><img src='/static/base/images/logo.png?v=7c4597ba713d804995e8f8dad448a397' alt='Jupyter Notebook'/></a></div>

  
  
  


  

  
  
  </div>
  <div class="header-bar"></div>

  
  
</div>

<div id="site">


<div class="error">
    
    <h1>404 : Not Found</h1>
    
    
<p>You are requesting a page that does not exist!</p>

</header>


</div>







</body>

</html>)

gandhis1 avatar Apr 08 '17 22:04 gandhis1

Same issue here.

On the Jupyter Notebook output I have this line: [W 14:11:40.594 NotebookApp] 404 GET /%20/api/kernelspecs?1492517500564 (127.0.0.1) 21.00ms referer=None Note the /%20/ at the begining of the URI. Using this URI directly in the browser lead to the same error. When removing /%20/, the browser show a JSON.

jupyter-core (4.3.0) notebook (5.0.0)

bizoo avatar Apr 18 '17 12:04 bizoo

same issue for me

[W 08:26:13.274 NotebookApp] 404 GET /%20/api/kernelspecs?1500420373261 (127.0.0.1) 8.00ms referer=None

loopinf avatar Jul 18 '17 23:07 loopinf

Same issue. [W 21:58:53.898 NotebookApp] 404 GET /%20/api/kernelspecs?1502632733604 (127.0.0.1) 4.00ms referer=None

Herman-Wu avatar Aug 13 '17 14:08 Herman-Wu

By default Jupyter disables listing available kernels. You guys need to modify two Jupyter config files to allow kernelspec listing.

Add following line to KernelGateway config file: c.JupyterWebsocketPersonality.list_kernels = True

I forgot which line to add to Jupyter Notebook config file, but you should be able to find it in Jupyter Notebook config options help page.

Good luck!

FuriouslyCurious avatar Sep 21 '17 08:09 FuriouslyCurious

So issue 55 is by this ??

[I 15:22:11.480 NotebookApp] 0 active kernels 
[I 15:22:11.480 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/
[I 15:22:11.480 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 15:22:12.959 NotebookApp] 404 GET /%20/api/kernelspecs?1508138532718 (127.0.0.1) 226.00ms referer=None
[W 15:22:26.663 NotebookApp] 404 GET /%20/api/kernelspecs?1508138546655 (127.0.0.1) 2.00ms referer=None
[W 15:22:51.627 NotebookApp] 404 GET /%20/api/kernelspecs?1508138571617 (127.0.0.1) 4.00ms referer=None
[W 15:23:42.049 NotebookApp] 404 GET /%20/api/kernelspecs?1508138622016 (127.0.0.1) 4.00ms referer=None
[W 15:24:23.122 NotebookApp] 404 GET /%20/api/kernelspecs?1508138663119 (127.0.0.1) 2.00ms referer=None
[W 15:28:34.368 NotebookApp] 404 GET /%20/api/kernelspecs?1508138914354 (127.0.0.1) 4.00ms referer=None
[W 15:35:57.348 NotebookApp] 404 GET /%20/api/kernelspecs?1508139357339 (127.0.0.1) 4.00ms referer=None

And I found there is no way to stop jupyter ?? I have to kill the progress.

eromoe avatar Oct 16 '17 07:10 eromoe

Yes - you are running in to kernelspec issues.

If Jupyter is running in background, you can use "fg" to bring it to foreground and exit cleanly with two Ctrl-C strokes.

FuriouslyCurious avatar Oct 16 '17 18:10 FuriouslyCurious

Unfortunately, I am in windows, no fg command ...

this

c.JupyterWebsocketPersonality.list_kernels = True

and https://github.com/DonJayamanne/vscodeJupyter/issues/55#issuecomment-336848152

both not work .

eromoe avatar Oct 17 '17 08:10 eromoe

Following commands are for Linux, so adapt them for Windows as necessary.


# Generate config file for KernelGateway
jupyter kernelgateway --KernelGatewayApp.generate_config=True

# Generate config for Jupyter Notebook
jupyter notebook --generate-config --allow-root

# Append appropriate values to both config files
echo -e "c.JupyterWebsocketPersonality.list_kernels = True" >> ~/.jupyter/jupyter_kernel_gateway_config.py
echo -e "c.NotebookApp.allow_root = True" >> ~/.jupyter/jupyter_notebook_config.py

FuriouslyCurious avatar Oct 17 '17 19:10 FuriouslyCurious

Thanks for the tip, prerequire in this link https://github.com/DonJayamanne/vscodejupyter/wiki is unaccessable.

I set c.JupyterWebsocketPersonality.list_kernels = True in ~/.jupyter/jupyter_notebook_config.py before. That's wrong, need pip install jupyter_kernel_gateway .

Then got new error :

[W 08:46:17.592 NotebookApp] 403 POST /api/kernels?1508287577560 (127.0.0.1): '_xsrf' argument missi
ng from POST
[W 08:46:17.638 NotebookApp] 403 POST /api/kernels?1508287577560 (127.0.0.1) 46.00ms referer=None

Work around by c.NotebookApp.disable_check_xsrf = True.

At this time, no alert error any more, first click Run Cell , console shows

[W 08:51:20.288 NotebookApp] 404 GET /api/kernels/01e89faf-51fb-405f-acc1-05ad966c9f9f/channels?sess
ion_id=d3f1fa998c02a4c7e2dc4fec97bd3bb8&token=undefined (127.0.0.1): Kernel does not exist: 01e89faf
-51fb-405f-acc1-05ad966c9f9f
[W 08:51:20.339 NotebookApp] 404 GET /api/kernels/01e89faf-51fb-405f-acc1-05ad966c9f9f/channels?sess
ion_id=d3f1fa998c02a4c7e2dc4fec97bd3bb8&token=undefined (127.0.0.1) 127.00ms referer=None
[W 08:51:24.351 NotebookApp] Replacing stale connection: 01e89faf-51fb-405f-acc1-05ad966c9f9f:d3f1fa
998c02a4c7e2dc4fec97bd3bb8
[I 08:51:50.976 NotebookApp] Kernel started: d035e457-a9fd-4d2c-95fe-5ce305fdcf8b
d:\python27\lib\site-packages\win_unicode_console\__init__.py:31: RuntimeWarning: sys.stdin.encoding
 == None, whereas sys.stdout.encoding == 'utf-8', readline hook consumer may assume they are the sam
e
  readline_hook.enable(use_pyreadline=use_pyreadline)
d:\python27\lib\site-packages\dateutil\parser.py:605: UnicodeWarning: Unicode equal comparison faile
d to convert both arguments to Unicode - interpreting them as being unequal
  elif res.tzname and res.tzname in time.tzname:
[I 08:51:52.190 NotebookApp] Adapting to protocol v5.1 for kernel d035e457-a9fd-4d2c-95fe-5ce305fdcf
8b

Stuck at Adapting to protocol v5.1 for kernel , click Run Cell with no reaction.

eromoe avatar Oct 18 '17 00:10 eromoe

You should try Anaconda instead of PIP. I wrote the wiki based on Anaconda install, which includes kernel-gateway by default.

FuriouslyCurious avatar Oct 20 '17 23:10 FuriouslyCurious