Python in Visual Studio Code – December 2018 Release

Dan Taylor

We are pleased to announce that the December 2018 release of the Python Extension for Visual Studio Code is now available. You can download the Python extension from the Marketplace, or install it directly from the extension gallery in Visual Studio Code. You can learn more about Python support in Visual Studio Code in the documentation.

This release was a short release, where we primarily focused on two top-requested features for the data science experience shipped in November: remote Jupyter support and export Python files as Jupyter Notebooks. We have also fixed many issues reported on GitHub, and you can see the full list in our changelog.

Keep on reading to learn more!

Remote Jupyter Support

This release enables you to connect to remote Jupyter servers for execution, so you can offload intensive computation to other machines that have more compute power or have a specific hardware spec that you need.

To connect to a remote Jupyter server, run this new command Python: Specify Jupyter server URI in the Visual Studio Code Command Palette.

Then you will be asked to enter the hostname and a token for authentication.

You can find the token in the terminal when you start a Jupyter Notebook server with token authentication enabled. The token is generated and logged to the terminal. For example:

[I 11:59:16.597 NotebookApp] The Jupyter Notebook is running at:

Copy the URL in the terminal and then paste into VS Code.

Cells will now be executed using the remote Jupyter server, and you can see that information in the Interactive window. Here is an example of a Windows machine connecting to a Linux VM for execution (the real URI is blurred out for security reasons 😊):

Token-based authentication is on by default for notebook 4.3 and later. This document has more details on Security in the Jupyter notbeook server.

Export Python files as Jupyter Notebooks

This update adds two commands for exporting Python files as Jupyter Notebooks. Along with the export run results command that was shipped in the previous release, the Python extension now offers three Export as Jupyter Notebook options and you can choose the one that is right for your use-case.

After exporting you will see a message box with an “Open in browser” button, which will open the exported notebook file locally in a browser.

Other Changes and Enhancements

We have also added small enhancements and fixed issues requested by users that should improve your experience working with Python in Visual Studio Code. The full list of improvements is listed in our changelog; some notable changes include:

  • Update the Microsoft Python language server to 0.1.72/12.1(#3657), allowing proper resolution and Go to Definition for namespace packages and relative imports.
  • Load the language server in the background during extension activation. (#3020)
  • Display progress indicator when activating the language server and validating user setup. (#3082)
  • Updated logic used to determine whether the Language Server is supported. (#2729)
  • Allow users to request the ‘Install missing Linter’ prompt to not show again for pylint. (#3349)
  • Run in the workspace directory by default for the interactive window. (#3407)
  • Add support for running Python interactive commands from the command palette. (#3476)

Be sure to download the Python extension for Visual Studio Code now to try out the above improvements. If you run into any problems, please file an issue on the Python VS Code GitHub page.




Discussion is closed.

Feedback usabilla icon