Setting up and integrating Jupyter Notebook development environment with VSC

Hello Pythonistas!

I am trying to set up the Jupyter Notebook extension for VSCode but I can’t get my code snippets to run.

If you check out this YouTube clip at exactly 1 minute and 46 seconds (here - - you can pause it to see the still) this is what I am trying to accomplish.

But here is what my VSCode actually looks like:

As you can see in mine, the “Play” icon to the left of my code snippet is missing. Along the top border, the other “Play All” button is missing.

In Microsoft’s official VSC doc for setting up Jupyter Notebooks, right near the top under this specific heading: “Create or open a Jupyter Notebook” their interface has way more options at the top of the cells when compared to mine. They have buttons named: “Variables”, “Restart”, “Interrupt”. That is expected for Jupyter Notebook funcionality. Mine is missing all of that. Clearly there is something wrong with my setup.

What information could I provide to identify what the misconfiguration issue is with my VSCode environment?

I was looking in other places online like Stack Overflow where users who had ms-python extension installed (which includes Jupyter functionality) and then had additionall stand-alone Jupyter Notebook extensions installed. Apparently if you have multiple installed, they can interfere with each other. So after much wrangling, I resolved to uninstalling all my Jupyter extensions and keeping only the main ms-python extension.

The issue persists.

Any idea what else I could try?

Here is VSC print out a list of currently installed extensions with version numbers:


Also posted here: Setting up and integrating Jupyter Notebook development environment with VSC.

Have you selected/set base i.e. which Python version/environment should VS Code code use to run cell/notebook?

When I client the “Select Kernel” button at the top right in the screenshot below, it reveals an empty menu pictured at the top:

Here is “Python v3.8.5 (conda)” showing as selected at the bottom and slightly to the left:

Python (conda) v3.8.5 showing at bottom right

This exhaustive question on Stack Overflow with the same issue as mine includes many creative potential solutions: python - jupyter server : not started, no kernel in vs code - Stack Overflow

One Stack Overflow member recommends:

Someone else suggests:

Another member says:

None of the above resolved my original issue.

Here is a new twist: After installing jupyterlab or some other package (or set of packages), after restarting VSC, I I encountered this weird error:

It’s a condition box. I clicked: “Yes”. Jupyter is still not integrated properly.

Hi ND: The next time I cross post threads on multiple forums, I will be sure to annotate with hyperlinks at the bottom of my original post.

For what it is worth, I have consolidated what I have learned so far in this thread, did some more research, polished up my question, and cross posted again but this time to Stack Overflow. You can check it out here: Integrating Python and Jupyter Notebook with Visual Studio Code - Stack Overflow

When I find a solution, I will be sure to follow up in all three locations with closure.

After much wrangling with official and third party VSC extenions on the marketplace, I discovered an answer that required some very straight forward ‘out of the box’ problem solving: I installed the VSC package in the official Snap repo.

Visual Studio Code and Python-Jupyter are now playing nice together.