community
"Marky's post about using Jupyter Notebooks in VS Code"

Using Jupyter Notebooks in VS Code

As you probably know by now, I am a huge VS Code fan. VS Code has made all other text editors obsolete. I still use Sublime Text for my non-programming text editing, but when developing anything more than a few lines of code, VS Code is my tool of choice.

If you have been following my Python Tips series, you might have seen my post on Jupyter Notebooks. A tool I frequently use for interactive development and testing.

Jupyter notebooks is similar to an interactive python session like REPL, but your code is saved and you can integrate things like charts, dataframes, and images. I frequently use notebooks when I need to test a theory and build a complex function as it allows me to visualize data easier and get quick feedback on what I am doing.

No longer do you have to run your own Jupyter Notebooks server, you can just start a notebook directly in VS Code.

If you are doing Python development, you really need to first install the Python extension for VS Code as it adds a ton of functionality.

Once the extension is installed, you can launch a Jupyter notebook with the command palette.

Just open up the command palette with Control-Shift-P and type in Create New...

Once you do that, it will launch Jupyter and start a new notebook.

From there, you can do anything you can do in Jupyter Notebooks, directly in VS Code.

If you do not have the Jupyter packages installed, VS Code will prompt you to install it.

I also recommend you update to Python 3.8. As you can see here, this older environment is only running 3.6.5 but I wanted to change to one that didn't have the Jupyter modules installed.

Using one of the quick Pandas examples, you can see VS Code Jupyter Notebook support is fantastic and works very similar to Jupyter Notebooks.


Securely chat with me on Keybase

Why you should vote me as witness

Using Jupyter Notebooks in VS Code

This is a cross post of @themarkymark/using-jupyter-notebooks-in-vs-code by @xves.

Marky's post about using Jupyter Notebooks in VS Code

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now
Logo
Center