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:


arcticicestudio.nord-visual-studio-code@0.19.0
batisteo.vscode-django@1.8.0
bibhasdn.django-html@1.3.0
Compulim.indent4to2@0.1.2
Equinusocio.vsc-community-material-theme@1.4.4
Equinusocio.vsc-material-theme@33.5.0
equinusocio.vsc-material-theme-icons@2.3.1
esbenp.prettier-vscode@9.5.0
formulahendry.code-runner@0.11.8
GulajavaMinistudio.mayukaithemevsc@3.2.3
janisdd.vscode-edit-csv@0.6.10
lonefy.vscode-JS-CSS-HTML-formatter@0.2.3
m-thorsen.vscode-materia@0.4.4
ms-python.python@2022.12.0
NikolaosGeorgiou.html-fmt-vscode@0.6.0
PKief.material-icon-theme@4.19.0
samuelcolvin.jinjahtml@0.17.0
streetsidesoftware.code-spell-checker@2.5.4
yzhang.markdown-all-in-one@3.5.0
zamerick.black-ocean@1.0.2

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.