7

is there a way to use JupyterLab in VS Code? I know that VS Code provides the Jupyter Notebook extension. However, I need to connect to another server remotely......

Any guidance will be appreciated!

Peter Macej
  • 4,831
  • 22
  • 49
HXW
  • 73
  • 1
  • 1
  • 3

1 Answers1

7

You can offload intensive computation in a Jupyter Notebook to other computers by connecting to a remote Jupyter server. Once connected, code cells run on the remote server rather than the local computer.

To connect to a remote Jupyter server:

  1. Select the Jupyter Server: local button in the global Status bar or run the Jupyter: Specify local or remote Jupyter server for connections command from the Command Palette (Ctrl+Shift+P).

Specify remote Jupyter server

  1. When prompted to Pick how to connect to Jupyter, select Existing: Specify the URI of an existing server.

Choose to connect to an existing server

  1. When prompted to Enter the URI of a Jupyter server, provide the server's URI (hostname) with the authentication token included with a URL parameter. (If you start the server in the VS Code terminal with an authentication token enabled, the URL with the token typically appears in the terminal output from where you can copy it.) Alternatively, you can specify a username and password after providing the URI.

Prompt to supply a Jupyter server URI

For guidance about securing a notebook server, refer to the Jupyter documentation.

MingJie-MSFT
  • 5,569
  • 1
  • 2
  • 13
  • 4
    The question is about JupyterLab and not for JupyterHub. – Ivailo Bardarov Jun 24 '22 at 08:07
  • 1
    I think JupyterLab and JupyterHub are used interchangeably as they changed the name (that is what I could see from googling it myself). – GenDemo Aug 12 '22 at 01:01
  • I have an extension question to this - when you connect to a JupyterHub server, is the idea that you clone your repositories to your local computer and work on them there, and then push the processing through to the server using this SSH connection. (apologies for the very non-techy description) – GenDemo Aug 12 '22 at 01:07
  • 1
    @GenDemo If you are using a JupyterLab/Hub server (that's not on your device) with SSH, you are already in that remote computer and work in its repositories. So no, you don't clone it and push it to the server. You can just press 'save'. – Jelmer Mulder Oct 09 '22 at 19:16
  • Does anyone know what this error means: "Connection failure. request to xxxxxx failed, reason: unable to verify first certificate)."? this is after I enter the server URI (and it does it with only my user or with the token suffix. Sometimes, it asks for a username and password, but I get the same error irrespective. – GenDemo Jan 10 '23 at 01:34