[go: up one dir, main page]

Skip to content

bug: Can't run VSCode Jupyter Extension in a Workspace

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

MR: gitlab-web-ide-vscode-fork!105 (merged)

Description

As a Workspaces user, I want to use the VSCode Jupyter Notebook extension to edit and execute Jupyter notebooks. However, when I install the VSCode's Jupyter notebook extension, and I run a Notebook, I see the following error in the console:

Screenshot_2024-12-12_at_12.13.39_PM jupyter_notebook_error_in_vscode.png

The Jupyter extension depends on VSCode Python extension.

Acceptance Criteria

  • After, installing the Jupyter Notebook extension in a Workspace with a Python environment, I should be able to visualize and evaluate notebooks in a Workspace.

Result

Implementation guidelines

The ms-toolsai and ms-python.python extensions depend on rely on enabling proposed APIs in production environments even when 3rd-party extensions can't use proposed APIs in this scenario. Other products similar to Workspaces enable all proposed APIs in production to avoid bugs with these extensions. We can use the same approach by declaring enabled proposed APIs in product.json using the enabledApiProposals attribute.

Update Note (Feb 26):

  • After the implementation of Enable all Proposed APIs (#514741 - closed) we discovered that enabling the proposed APIs is not enough to get the Jupyter Notebook extensions to work. There is a rendering issue with the vscode.builtin-renderer. A fix will need to be looked into.

Steps to test

  1. Create a Workspace
  2. Install the VSCode Jupyter Notebook extension (If using GDK make sure Admin preferences has Enabled extension marketplace)
  3. Selecting the Kernel will install the Python extension if not already installed and then as you to select the python interpreter.

Note:

  • Running a simple python command like print("hello") in the notebook fails because it says no pip is installed. I guess the default ubuntu image does not have pip properly configured.

  • Workaround: Within the workspace, creating a new virtual environment from the existing python installation and then selecting that environment as the kernel for jupyter notebook, executes the command successfully but there is some rendering issue.

Impact Assessment

TODO: Fixing this bug will enable basic data science workflows in Workspaces.

Edited by 🤖 GitLab Bot 🤖