VS Code Jupyter extension
Перейти к файлу
Don Jayamanne ce8cd4a654
Bump engine version (#16182)
2024-10-30 03:31:21 +00:00
.devcontainer Bump version of node, npm and ts (#16151) 2024-10-27 19:05:13 -07:00
.github Update PR template (#16177) 2024-10-29 06:33:21 -07:00
.husky Remove generateTelemetry from pre-commit (#12056) 2022-11-17 01:02:21 +00:00
.vscode Disable build on opening workspace (#16181) 2024-10-30 03:31:05 +00:00
api Fixes to proposed API format (#15169) 2024-02-09 13:05:19 +11:00
build Bump version of node, npm and ts (#16151) 2024-10-27 19:05:13 -07:00
data Use defaultInterpreterPath over pythonPath (#8610) 2021-12-22 15:58:02 -08:00
images Remove unwanted files (#14290) 2023-09-08 16:39:50 +10:00
pythonFiles use pydevd safeRepr to get string value (#16029) 2024-09-10 12:12:44 -07:00
resources Revert changes to fix IPyWidget tests (#14431) 2023-10-04 09:24:36 -07:00
snippets Remove more unnecessary code (#85) 2020-09-17 14:00:29 -07:00
src Update mocks to resolve compilation errors (#16180) 2024-10-29 20:24:17 -07:00
types Remove rxjs (#14617) 2023-10-31 01:47:58 +11:00
.editorconfig
.eslintignore Use esbuild for all webviews (#14458) 2023-10-06 08:40:30 -07:00
.eslintrc.js Code completions from kernel behind and experiment (#14770) 2023-11-24 00:07:28 +00:00
.gitattributes Update to Jedi 0.17 (#11252) 2020-04-21 10:16:35 -07:00
.gitignore Update .gitignore to ignore tmp and temp (#14632) 2023-10-31 17:13:12 -07:00
.nvmrc Bump version of node, npm and ts (#16151) 2024-10-27 19:05:13 -07:00
.prettierignore Create platform directory structure (#9439) 2022-03-22 15:01:30 -07:00
.prettierrc.js Support Update Display Data (#10874) 2020-03-31 11:08:15 -07:00
.vscode-test.mjs Enable vscode test in Test Explorer (#15464) 2024-04-02 17:29:48 -07:00
.vscodeignore esbuild for main bundle (#14599) 2023-10-31 14:31:34 -07:00
CHANGELOG.md Fixes from release (#14720) 2023-11-14 11:06:18 -08:00
CODE_OF_CONDUCT.md
CODING_STANDARDS.md Run prettier on our yaml, json and md files (#10871) 2020-04-01 10:19:44 -07:00
CONTRIBUTING.md Update compilation/build tasks (#16170) 2024-10-29 13:13:37 +01:00
CodeQL.yml Revert changes to fix IPyWidget tests (#14431) 2023-10-04 09:24:36 -07:00
CredScanSuppressions.json Ignore as keys/pwd are only used in tests (#15459) 2024-04-01 15:39:05 -07:00
INTERACTIVE_TROUBLESHOOTING.md Remove unwanted files (#14290) 2023-09-08 16:39:50 +10:00
LICENSE
README.md `telemetry.enableTelemetry` is now `telemetry.telemetryLevel` (#13052) 2023-03-20 08:44:00 +00:00
SECURITY.md Run prettier on our yaml, json and md files (#10871) 2020-04-01 10:19:44 -07:00
debugpy_logging.cmd Port back release changelog changes (#9008) 2022-02-11 16:24:02 -08:00
gulpfile.js Bundle jsoncparser with esbuild (#15116) 2024-02-02 06:05:14 +01:00
icon.png Losslessly compress PNG images (#5869) 2021-05-14 07:52:48 -07:00
package-lock.json Bump engine version (#16182) 2024-10-30 03:31:21 +00:00
package.json Bump engine version (#16182) 2024-10-30 03:31:21 +00:00
package.nls.json option to use Notebook API for opening IW (#16084) 2024-10-03 08:49:44 -07:00
pvsc.code-workspace Performance measurements of Notebooks (#15585) 2024-04-26 15:30:30 +02:00
tsconfig.base.json Clean up tsconfigs (#12107) 2022-11-21 15:12:56 -08:00
tsconfig.datascience-ui.json Set all tsconfigs to target es2020 (#12090) 2022-11-18 10:54:43 -08:00
tsconfig.json Add setting for kernel completions (#14763) 2023-11-23 07:41:57 +11:00

README.md

Jupyter Extension for Visual Studio Code

A Visual Studio Code extension that provides basic notebook support for language kernels that are supported in Jupyter Notebooks today, and allows any Python environment to be used as a Jupyter kernel. This is NOT a Jupyter kernel--you must have Python environment in which you've installed the Jupyter package, though many language kernels will work with no modification. To enable advanced features, modifications may be needed in the VS Code language extensions.

NotebookUI

Link Description
File an issue Report problems and suggest enhancements
Go to docs Jupyter extension and data science in VS Code documentation, tutorials, and more
Discussions Post questions, and engage in community discussions

Work in the browser

Editing Jupyter notebooks in VS Code can also be done on the browser in two ways.

  1. The Jupyter extension has support for a web based interface provided by vscode.dev (which includes github.dev, available by typing '.' when viewing a repo on github.com)
  2. The Jupyter extension can be installed on VS Code in GitHub Codespaces the same way it is done locally (or sync your VS Code settings to have your extensions installed automatically on Codespaces).

Installed extensions

The Jupyter Extension will automatically install the following extensions by default to provide enhanced Jupyter notebook experiences in VS Code.

You can also install the Jupyter PowerToys extension to try out experimental features (not installed by default). Extensions installed through the marketplace are subject to the Marketplace Terms of Use, and any or all of these extensions can be disabled or uninstalled.

Working with Python

Quick Start

  • Step 1. Install VS Code
  • Step 2. Install Anaconda/Miniconda or another Python environment in which you've installed the Jupyter package
  • Since not working with Python, make sure to have a Jupyter Kernel that corresponds to the language you would like to use installed on your machine.
  • Step 3. Install the Jupyter Extension and the Python Extension
  • Step 4. Open or create a notebook file by opening the Command Palette (Ctrl+Shift+P) and select Jupyter: Create New Jupyter Notebook.
  • Step 5. Select your kernel by clicking on the kernel picker in the top right of the notebook or by invoking the Notebook: Select Notebook Kernel command and start coding!

Working with other Languages

The Jupyter Extension supports other languages in addition to Python such as Julia, R, and C#.

Quick Start

  • Step 1. Install VS Code
  • Step 2. Since not working with Python, make sure to have a Jupyter kernelspec that corresponds to the language you would like to use installed on your machine.
  • Step 3. Install the Jupyter Extension
  • Step 4. Open or create a notebook file and start coding!

Notebook support

The Jupyter Extension uses the built-in notebook support from VS Code. This UI gives a number of advantages to users of notebooks:

  • Out of the box support for VS Code's vast array of basic code editing features like hot exit, find & replace, and code folding.
  • Editor extensions like VIM, bracket colorization, linters and many more are available while editing a cell.
  • Deep integration with general workbench and file-based features in VS Code like outline view (Table of Contents), breadcrumbs and other operations.
  • Fast load times for Jupyter notebook (.ipynb) files. Any notebook file is loaded and rendered as quickly as possible, while execution-related operations are initialized behind the scenes.
  • Includes a notebook-friendly diff tool, making it much easier to compare and see differences between code cells, output and metadata.
  • Extensibility beyond what the Jupyter extension provides. Extensions can now add their own language or runtime-specific take on notebooks, such as the .NET Interactive Notebooks and Gather
  • While the Jupyter extension comes packaged with a large set of the most commonly used renderers for output, the marketplace supports custom installable renderers to make working with your notebooks even more productive. To get started writing your own, see VS Code's renderer api documentation.

Useful commands

Open the Command Palette (Command+Shift+P on macOS and Ctrl+Shift+P on Windows/Linux) and type in one of the following commands:

Command Description
Jupyter: Create New Jupyter Notebook Creates a new Jupyter Notebook
Notebook: Select Notebook Kernel Select or switch kernels within your notebook
Notebook: Change Cell Language Change the language of the cell currently in focus
Jupyter: Export to HTML Jupyter: Export to PDF Create a presentation-friendly version of your notebook in HTML or PDF

To see all available Jupyter Notebook commands, open the Command Palette and type Jupyter or Notebook.

Context Keys for Key bindings

You can use the extension's context keys in 'when' clauses. Here's an example:

  {
    "key": "ctrl+i",
    "command": "jupyter.runAndDebugCell",
    "when": "!jupyter.webExtension"
  }

That keybinding states the jupyter.runAndDebugCell command should map to CTRL+I when not in the jupyter.webExtension.

The full list of context keys can be found here: https://github.com/microsoft/vscode-jupyter/wiki/Extensibility-for-other-extensions#context-keys-for-keybindings

Feature details

Learn more about the rich features of the Jupyter extension:

  • IntelliSense: Edit your code with auto-completion, code navigation, syntax checking and more.

  • Jupyter Notebooks: Create and edit Jupyter Notebooks, add and run code/markdown cells, render plots, create presentation-friendly versions of your notebook by exporting to HTML or PDF and more.

Supported locales

The extension is available in multiple languages: de, en, es, fa, fr, it, ja, ko-kr, nl, pl, pt-br, ru, tr, zh-cn, zh-tw

Questions, issues, feature requests, and contributions

  • If you have a question about how to accomplish something with the extension, please ask on Discussions. Our wiki can be a source of information as well.

  • Any and all feedback is appreciated and welcome! If you come across a problem or bug with the extension, please file an issue.

    • If someone has already filed an issue that encompasses your feedback, please leave a 👍/👎 reaction on the issue.
  • Contributions are always welcome, so please see our contributing guide for more details.

  • If you're interested in the development of the extension, you can read about our development process

Data and telemetry

The Microsoft Jupyter Extension for Visual Studio Code collects usage data and sends it to Microsoft to help improve our products and services. Read our privacy statement to learn more. This extension respects the telemetry.telemetryLevel setting which you can learn more about at https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.