Coder Social home page Coder Social logo

Comments (12)

tiangolo avatar tiangolo commented on June 6, 2024 4

Are you sure this isn't available yet?

Try this:

Then in VS Code:

  • ctrl+shift+p
  • Jupyter: Enter the url of local/remote Jupyter Notebook

Here's that command in the code repo.

It seems to me like this is an undocumented with an open issue, while the feature seems to be there 😄


Still, it doesn't have Hydrogen's inline results nor auto-completion.

But it's a lot closer than not being able to connect to a remote server at all.

As a plus, the token can be written right after running the kernel, it doesn't have to be pre-configured, so you don't have to change configurations in the remote server and locally before being able to use it (as with Hydrogen).


Also, I'm not trying to make it a "vim vs emacs", I'm a huge fan of both plugins and the greatly improved experience they provide.

from vscodejupyter.

Earthson avatar Earthson commented on June 6, 2024 1

Have you ever use Atom's Hydrogen extension? It supports remote kernel with jupyter.

https://atom.io/packages/hydrogen

from vscodejupyter.

breathe avatar breathe commented on June 6, 2024 1

I use the hydrogen extension quite often but have migrated to vscode for pretty much everything else.

I periodically check to see if vscode Jupiter supports execution in remote kernels yet ... I use a workflow that gives a similar experience as would be achieved with Jupyter notebooks but gets me out of horrible web page text editor land (which I hate)

  1. Sync a directory of files to a server somewhere via a file watching mechanism
  2. Configure a Jupiter kernel on a remote machine with the required packages and set its startup directory to the target from above sync
  3. Connect to remote kernel from 2 with hydrogen

It is a little quirky sometimes but works pretty well. Would love a vscode based alternative

from vscodejupyter.

tslaton avatar tslaton commented on June 6, 2024 1

One of the parameters given by running jupyter notebook --help-all is:

--NotebookApp.ip=<Unicode>
    Default: 'localhost'
    The IP address the notebook server will listen on.

Could that be useful for this purpose?

I've been able to successfully connect to a remote machine (a Google Cloud Platform instance) using the command @tiangolo mentioned, but I haven't yet managed to successfully connect to the same machine using various combinations of settings under the extension's "jupyter.notebook.startupArgs".

I'd really like to get that working so I don't have to enter the ip and token every time I want to connect.

from vscodejupyter.

DonJayamanne avatar DonJayamanne commented on June 6, 2024

Unfortunately not yet.

from vscodejupyter.

DonJayamanne avatar DonJayamanne commented on June 6, 2024

From @Earthson on October 20, 2016 9:28

Is there a way to connect to existing kernel by %connect_info?

http://jupyter-notebook.readthedocs.io/en/latest/examples/Notebook/Connecting%20with%20the%20Qt%20Console.html#The-Frontend/Kernel-Model

from vscodejupyter.

DonJayamanne avatar DonJayamanne commented on June 6, 2024

Unfortunately this isn't supported as of yet and will be looked at for a future release.

from vscodejupyter.

DonJayamanne avatar DonJayamanne commented on June 6, 2024

From @mkohram on February 17, 2017 19:15

I would be more than glad to help with getting existing implemented if I could get a couple of pointers where to start. Please let me know.

from vscodejupyter.

breathe avatar breathe commented on June 6, 2024

Oh cool -- I'll check it out!

from vscodejupyter.

andybrnr avatar andybrnr commented on June 6, 2024

Hi all,
Currently exploring development solutions for my DS team. While there are lots of positives to a JupyterHub/JupyterLabs, the irritation of saving all notebooks as .py files for version control has me exploring other options. I've been playing with Atom/Hydrogen running remote kernels on AWS, and this seems to be a reasonable solution. There is some awkwardness, though (need to run the remote kernel in a synchronized directory structure to pick up local imports or use sshfs). Any thoughts on similar issues/maturity of using VS Code for doing local development with execution on remote kernels? One issue I've run into so far is that kernel_gateway doesn't seem to work, though tests with notebook server worked ok (had some problems restarting/shutting down kernels, but that might have been a notebook server config issue). Thanks!

from vscodejupyter.

puppyapple avatar puppyapple commented on June 6, 2024

@tiangolo why i get nothing after typing the url following with entring the token, have tried many times?

from vscodejupyter.

tiangolo avatar tiangolo commented on June 6, 2024

Sorry for the late response @puppyapple .

When you hit enter it doesn't show any obvious cue telling you if it worked or not. But you get a little new item in the blue status bar at the bottom. It tells you which Python kernel is running.

Then you can select a Python line, hit Ctrl + Shift + p, find the command Jupyter: Run Selection/Line and execute it. It won't show you if it ran or not, only when your code is an expression that results in a value. So, import os won't show anything, my_var = "some text" won't show anything either, but "some text" alone will open the output display and show the printed "some text".

from vscodejupyter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.