quarto-dev / quarto

Quarto open-source scientific and technical publishing system
https://quarto.org
GNU Affero General Public License v3.0
280 stars 19 forks source link

VSCode Extension: "Executing python cells requires the Jupyter extension." #385

Closed heygent closed 2 months ago

heygent commented 4 months ago

Trying to run a cell in a qmd file doesn't work, and gives the notification "Executing python cells requires the Jupyter extension.". Jupyter extension is installed and working with ipynb files.

Running macOS Sonoma 14.2.1.

Notification screenshot
Quarto 1.4.549
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.11: OK
      Dart Sass version 1.69.5: OK
      Deno version 1.37.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.4.549
      Path: /Applications/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: (not installed)
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: Installation From Path
      Path: /Library/TeX/texbin
      Version: 2023

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.12.1
      Path: /Users/gent/.pyenv/versions/3.12.1/envs/tesi/bin/python3
      Jupyter: 5.7.1
      Kernels: loball, tesi, python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/
skwde commented 2 months ago

Same with 1.4.553:

# quarto check
Quarto 1.4.553
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.11: OK
      Dart Sass version 1.69.5: OK
      Deno version 1.37.2: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.4.553
      Path: /opt/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: (not installed)
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Tex:  (not detected)

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.11.9
      Path: /usr/local/bin/python3
      Jupyter: 5.7.2
      Kernels: python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/

and

# jupyter --version
Selected Jupyter core packages...
IPython          : 8.23.0
ipykernel        : 6.29.4
ipywidgets       : 8.1.2
jupyter_client   : 8.6.1
jupyter_core     : 5.7.2
jupyter_server   : 2.13.0
jupyterlab       : 4.1.5
nbclient         : 0.10.0
nbconvert        : 7.16.3
nbformat         : 5.10.4
notebook         : 7.1.2
qtconsole        : 5.5.1
traitlets        : 5.14.2
cderv commented 2 months ago

Could you both confirm that you have the VSCODE Jupyter Extension : https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter

The message in VSCODE refers to the Jupyter Extension as a VSCODE Extension like Quarto Extension, and not just the Jupyter module from pip installed your selected Python version.

Thanks

skwde commented 2 months ago

Thanks for your immediate reply.

Yes it is indeed working when the jupyter extension is installed.

VSCode asked me to install the python extension ms-python.python but not the jupyter extensions ms-toolsai.jupyter.

Besides that since this seems to be a dependency for https://quarto.org/docs/get-started/hello/vscode.html it should be mentioned there.

Is there a list somewhere which extensions are required in which case?

cderv commented 2 months ago

Is there a list somewhere which extensions are required in which case?

This is mentioned there: https://quarto.org/docs/tools/vscode.html#code-cells

but it seems Jupyter extension is missing. It is mentioned in Python extension doc : https://marketplace.visualstudio.com/items?itemName=ms-python.python#jupyter-notebook-quick-start

We could probably add it to the documentation

cderv commented 2 months ago

We could probably add it to the documentation

I added to the doc.