Still not able to render a Quarto file (qmd) using Julia in VSCode. Help?

My questions is basically a follow up to a very similar question you can find here.

I have:

  • run Pkg.build("IJulia"),
  • removed and reinstalled IJulia, and then built the package again,
  • removed the Jupyter extension and reinstalled it
  • Re-followed the steps at using Quarto with Julia

But nothing has worked. I still can’t render a .qmd file when I am using Julia in VSCode. Here’s the error message I get.

ERROR: Jupyter kernel 'julia-1.8' not found.

Here’s the information about my Julia version

Julia Version 1.8.5
Commit 17cfb8e65e (2023-01-08 06:45 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 16 × Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, skylake)
  Threads: 1 on 16 virtual cores        
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS =

Any idea of what I can do solve this?

Try running

quarto check

to see what versions of Python and Jupyter are being used by Quarto.

Often there will be a default version of Python on the system and it doesn’t see the version that IJulia is using.

Hi, @dmbates

Here’s the answer I got after running quarto check. The two checks return OK, but there’s also an error. Do you know how I should proceed?

[>] Checking Quarto installation......OK
      Version: 1.2.335
      Path: C:\Users\hsd36\AppData\Local\Programs\Quarto\bin
      CodePage: 1252

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

ERROR: The file cannot be accessed by the system. (os error 1920), stat 'C:\Users\hsd36\AppData\Local\Microsoft\WindowsApps\python3.9.exe'

Here is the result from quarto check for me

% quarto check

[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.1: OK
      Dart Sass version 1.55.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.3.340
      Path: /Applications/quarto/bin

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

[✓] Checking Python 3 installation....OK
      Version: 3.10.11 (Conda)
      Path: /usr/local/bin/python3
      Jupyter: 5.3.0
      Kernels: julia-1.9, python3

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

[✓] Checking R installation...........OK
      Version: 4.2.2
      Path: /Library/Frameworks/R.framework/Resources
      LibPaths:
        - /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library
      knitr: 1.42
      rmarkdown: 2.21

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

so you can see that for me there is a Python 3 installation with Jupyter and two Jupyter kernels.

If you already have the IJulia package installed then you should have a python3 and jupyter executable in the directory created by the Conda package. On Mac and Linux systems this directory is ~/.julia/conda/3/bin/ I’m not sure what it is on Windows - perhaps someone can tell us.

Quarto looks for a python3 executable and tries to run Jupyter with that. What I do on this system is to create a symbolic link to ~/.julia/conda/3/bin/python3 in /usr/local/bin so it is on the usual search path. Others might have more elegant solutions, especially for Windows.

dmbates@Douglass-MBP ~ % which python3
/usr/local/bin/python3
dmbates@Douglass-MBP ~ % ls -la `which python3`
lrwxr-xr-x  1 root  wheel  41 Dec 30 10:47 /usr/local/bin/python3 -> /Users/dmbates/.julia/conda/3/bin/python3
1 Like

Can you execute Julia code blocks in your Quarto file (“Run Cell”)? Can you start the Julia REPL in VS Code?

If not, check the Julia Executable Path setting in the VS Code Julia extension.

1 Like

I suggestion two step check

  1. IJulia installation

follow Instruction Julia in Quarto

using Pkg
Pkg.add("IJulia")
using IJulia
notebook()

open a new Jupyter note on your browser. then check your Julia version on dropdown menu New

  1. if you add header on qmd file, please notice not add patch version number
---
title: "StatsPlots Demo"
jupyter: julia-1.7
---

jupyter: julia-1.7 just major and minor number , not include patch number

1 Like