# Jupyter kernel not found when rendering with Quarto

**URL:** <https://discourse.julialang.org/t/jupyter-kernel-not-found-when-rendering-with-quarto/86205>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [August 23, 2022, 3:45pm UTC](https://discourse.julialang.org/t/jupyter-kernel-not-found-when-rendering-with-quarto/86205 "2022-08-23T15:45:26Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![sbacelar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sbacelar/32/4359_2.png) [@sbacelar](https://discourse.julialang.org/u/sbacelar)\
**Post date:** [August 23, 2022, 3:45pm UTC](https://discourse.julialang.org/t/jupyter-kernel-not-found-when-rendering-with-quarto/86205/1 "2022-08-23T15:45:26Z")

</div>

I am trying to use `Quarto` to render the following known example file (`ex2_Julia.qmd`):

````julia
---
title: "Plots Demo"
author: "Norah Jones"
date: "5/22/2021"
format:
  html:
    code-fold: true
jupyter: julia-1.8.0
---

## Parametric Plots

Plot function pair (x(u), y(u)).
See @fig-parametric for an example.

```{julia}
#| label: fig-parametric
#| fig-cap: "Parametric Plots"

using Plots

plot(sin,
     x->sin(2x),
     0,
     2π,
     leg=false,
     fill=(0,:lavender))

````

I have no problems when using the Python version, but when I do the following command on the terminal (Mac), I get an error:

```julia
❯ quarto render ex2_julia.qmd
ERROR: Jupyter kernel 'julia-1.8.0' not found.

```

I don’t understand why the kernel is not found. I added `IJulia`.

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [August 23, 2022, 3:54pm UTC](https://discourse.julialang.org/t/jupyter-kernel-not-found-when-rendering-with-quarto/86205/2 "2022-08-23T15:54:26Z")

</div>

What is the output of `jupyter kernelspec list`?

When you installed IJulia did you modify `ENV["PYTHON"]` to work in the same Python environment as Quarto?

See [GitHub - JuliaPy/PyCall.jl: Package to call Python functions from the Julia language](https://github.com/JuliaPy/PyCall.jl#specifying-the-python-version)

---

<div class="post-metadata">

**Author:** ![Wen-Wei\_Tseng](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wen-wei_tseng/32/28839_2.png) [@Wen-Wei\_Tseng](https://discourse.julialang.org/u/Wen-Wei_Tseng)\
**Post date:** [August 23, 2022, 3:57pm UTC](https://discourse.julialang.org/t/jupyter-kernel-not-found-when-rendering-with-quarto/86205/3 "2022-08-23T15:57:41Z")

</div>

> [@sbacelar](#):
>
> `julia-1.8.0`

Did you try `julia-1.8`

---

<div class="post-metadata">

**Author:** ![sbacelar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sbacelar/32/4359_2.png) [@sbacelar](https://discourse.julialang.org/u/sbacelar)\
**Post date:** [August 23, 2022, 3:59pm UTC](https://discourse.julialang.org/t/jupyter-kernel-not-found-when-rendering-with-quarto/86205/4 "2022-08-23T15:59:54Z")

</div>

You’re right:

```julia
Available kernels:
  ir /Users/sergiobacelar/Library/Jupyter/kernels/ir
  julia-1.6 /Users/sergiobacelar/Library/Jupyter/kernels/julia-1.6
  julia-1.7 /Users/sergiobacelar/Library/Jupyter/kernels/julia-1.7
  python3 /Users/sergiobacelar/Library/Jupyter/kernels/python3
  octave /Users/sergiobacelar/anaconda3/share/jupyter/kernels/octave

```

There is no `julia-1.8.0` kernel. How can I modify the `ENV`? I am using Anaconda and I have a `base` env. I tried `conda deactivate` but I think it didn’t work.

---

<div class="post-metadata">

**Author:** ![sbacelar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sbacelar/32/4359_2.png) [@sbacelar](https://discourse.julialang.org/u/sbacelar)\
**Post date:** [August 23, 2022, 4:03pm UTC](https://discourse.julialang.org/t/jupyter-kernel-not-found-when-rendering-with-quarto/86205/5 "2022-08-23T16:03:13Z")

</div>

Yes. Same error.

---

<div class="post-metadata">

**Author:** ![Wen-Wei\_Tseng](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wen-wei_tseng/32/28839_2.png) [@Wen-Wei\_Tseng](https://discourse.julialang.org/u/Wen-Wei_Tseng)\
**Post date:** [August 23, 2022, 4:05pm UTC](https://discourse.julialang.org/t/jupyter-kernel-not-found-when-rendering-with-quarto/86205/6 "2022-08-23T16:05:06Z")

</div>

In Julia REPL (plz make sure you are running Julia 1.8)

```julia
using Pkg
Pkg.build("IJulia")

```

This command should register the` julia-1.8` kernel.

Just to be sure, you can run `jupyter kernelspec list` to see if `julia-1.8` kernel is installed.

Edit: And as @mkitti suggested, please make sure IJulia is using the same python environment as quarto is.

---

<div class="post-metadata">

**Author:** ![mkitti](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mkitti/32/12459_2.png) [@mkitti](https://discourse.julialang.org/u/mkitti)\
**Post date:** [August 23, 2022, 4:07pm UTC](https://discourse.julialang.org/t/jupyter-kernel-not-found-when-rendering-with-quarto/86205/8 "2022-08-23T16:07:41Z")

</div>

Try this in julia.

```julia
ENV["PYTHON"] = "/path/to/python/used/by/quarto"
using Pkg
pkg"add PyCall"
pkg"build PyCall"
pkg"add IJulia"
pkg"build IJulia"

```

You can determine the path to quarto’s Python using `which python`.

---

<div class="post-metadata">

**Author:** ![sbacelar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sbacelar/32/4359_2.png) [@sbacelar](https://discourse.julialang.org/u/sbacelar)\
**Post date:** [August 23, 2022, 4:08pm UTC](https://discourse.julialang.org/t/jupyter-kernel-not-found-when-rendering-with-quarto/86205/9 "2022-08-23T16:08:26Z")

</div>

> [@sbacelar](#):
>
> `quarto render ex2_julia.qmd`

I think I found the solution:  
`build IJulia`

---

<div class="post-metadata">

**Author:** ![DrPapa](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/drpapa/32/6835_2.png) [@DrPapa](https://discourse.julialang.org/u/DrPapa)\
**Post date:** [August 24, 2022, 12:59pm UTC](https://discourse.julialang.org/t/jupyter-kernel-not-found-when-rendering-with-quarto/86205/10 "2022-08-24T12:59:36Z")

</div>

I see that `build` fixed your issue, but I wanted to put this here in case somebody else has a slightly different issue. I had a weird case were Quarto was picking up a different python version than what was on my path without me knowing. It was using some random conda env version. In that case `build` didn’t work b/c it wasn’t registering with the correct Jupyter install.

In that case , I was able to debug things using `quarto check`

---

<div class="post-metadata">

**Author:** ![visr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/visr/32/17204_2.png) [@visr](https://discourse.julialang.org/u/visr)\
**Post date:** [August 25, 2022, 8:36am UTC](https://discourse.julialang.org/t/jupyter-kernel-not-found-when-rendering-with-quarto/86205/11 "2022-08-25T08:36:15Z")

</div>

> [@DrPapa](#):
>
> I had a weird case were Quarto was picking up a different python version than what was on my path without me knowing. It was using some random conda env version.

This looks like it changed recently:

> Use IJulia’s built-in conda environment / jupyter install for julia notebooks/qmds  
> [https://github.com/quarto-dev/quarto-cli/blob/v1.1.120/news/changelog-1.1.md?plain=1#L10](https://github.com/quarto-dev/quarto-cli/blob/v1.1.120/news/changelog-1.1.md?plain=1#L10)

In older versions I had to set `QUARTO_PYTHON` to my IJulia conda `c:\Users\username\.julia\conda\3\python.exe`, since I don’t have `python` in my path.

---

<div class="post-metadata">

**Author:** ![jhchou](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jhchou/32/31208_2.png) [@jhchou](https://discourse.julialang.org/u/jhchou)\
**Post date:** [September 2, 2022, 9:41am UTC](https://discourse.julialang.org/t/jupyter-kernel-not-found-when-rendering-with-quarto/86205/12 "2022-09-02T09:41:27Z")

</div>

> [@DrPapa](#):
>
> In that case , I was able to debug things using `quarto check`

Thank you SO much for this suggestion. I’m in Python environment hell, and your suggestion showed that for whatever reason, `Quarto` couldn’t find my `Jupyter` installation.

---

<div class="post-metadata">

**Author:** ![Hugo](https://avatars.discourse-cdn.com/v4/letter/h/b38774/32.png) [@Hugo](https://discourse.julialang.org/u/Hugo)\
**Post date:** [January 12, 2023, 10:00pm UTC](https://discourse.julialang.org/t/jupyter-kernel-not-found-when-rendering-with-quarto/86205/13 "2023-01-12T22:00:49Z")

</div>

> [@Wen-Wei\_Tseng](#):
>
> `jupyter kernelspec list` to see if `julia-1.8` kernel is installed.

Where do I run this command?

---

<div class="post-metadata">

**Author:** ![Hugo](https://avatars.discourse-cdn.com/v4/letter/h/b38774/32.png) [@Hugo](https://discourse.julialang.org/u/Hugo)\
**Post date:** [January 12, 2023, 10:04pm UTC](https://discourse.julialang.org/t/jupyter-kernel-not-found-when-rendering-with-quarto/86205/14 "2023-01-12T22:04:32Z")

</div>

Any recommendations in case the accepted solution does not work? Quarto was working fine for me, but I just updated to a newer version of Julia (1.8.5), and maybe this has “broken” something.

---

<div class="post-metadata">

**Author:** ![lferrant](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lferrant/32/22751_2.png) [@lferrant](https://discourse.julialang.org/u/lferrant)\
**Post date:** [January 13, 2023, 11:28am UTC](https://discourse.julialang.org/t/jupyter-kernel-not-found-when-rendering-with-quarto/86205/15 "2023-01-13T11:28:33Z")

</div>

This seems to be an issue with Julia \> 1.8.3 and it has been reported in the quarto-cli repository:

> <https://github.com/quarto-dev/quarto-cli/issues/2539>
>
> \### Bug description
> 
> Hi, I am hitting this error, trying to render a .qmd file, …using Quarto in PowerShell (same with VSCode) on Windows 10. I can use the julia-1.7 kernel in jupyter lab, no probs. And I can render a .qmd using the python3 kernel in quarto
> \`\`\`
> Starting julia-1.7 kernel...Traceback (most recent call last):
> File "C:\\Program Files\\Quarto\\share\\jupyter\\jupyter.py", line 21, in \<module\>
> from notebook import notebook\_execute, RestartKernel
> File "C:\\Program Files\\Quarto\\share\\jupyter\\notebook.py", line 17, in \<module\>
> from nbclient import NotebookClient
> File "C:\\Users\\arn203\\.julia\\conda\\3\\lib\\site-packages\\nbclient\\\_\_init\_\_.py", line 6, in \<module\>
> from .client import NotebookClient, execute # noqa: F401
> File "C:\\Users\\arn203\\.julia\\conda\\3\\lib\\site-packages\\nbclient\\client.py", line 14, in \<module\>
> from jupyter\_client import KernelManager
> File "C:\\Users\\arn203\\.julia\\conda\\3\\lib\\site-packages\\jupyter\_client\\\_\_init\_\_.py", line 6, in \<module\>
> from .asynchronous import AsyncKernelClient # noqa
> File "C:\\Users\\arn203\\.julia\\conda\\3\\lib\\site-packages\\jupyter\_client\\asynchronous\\\_\_init\_\_.py", line 1, in \<module\>
> from .client import AsyncKernelClient # noqa
> File "C:\\Users\\arn203\\.julia\\conda\\3\\lib\\site-packages\\jupyter\_client\\asynchronous\\client.py", line 6, in \<module\>
> from jupyter\_client.channels import HBChannel
> File "C:\\Users\\arn203\\.julia\\conda\\3\\lib\\site-packages\\jupyter\_client\\channels.py", line 12, in \<module\>
> import zmq.asyncio
> File "C:\\Users\\arn203\\.julia\\conda\\3\\lib\\site-packages\\zmq\\\_\_init\_\_.py", line 103, in \<module\>
> from zmq import backend
> File "C:\\Users\\arn203\\.julia\\conda\\3\\lib\\site-packages\\zmq\\backend\\\_\_init\_\_.py", line 31, in \<module\>
> raise original\_error from None
> File "C:\\Users\\arn203\\.julia\\conda\\3\\lib\\site-packages\\zmq\\backend\\\_\_init\_\_.py", line 26, in \<module\>
> \_ns = select\_backend(first)
> File "C:\\Users\\arn203\\.julia\\conda\\3\\lib\\site-packages\\zmq\\backend\\select.py", line 31, in select\_backend
> mod = import\_module(name)
> File "C:\\Users\\arn203\\.julia\\conda\\3\\lib\\importlib\\\_\_init\_\_.py", line 127, in import\_module
> return \_bootstrap.\_gcd\_import(name\[level:\], package, level)
> File "C:\\Users\\arn203\\.julia\\conda\\3\\lib\\site-packages\\zmq\\backend\\cython\\\_\_init\_\_.py", line 6, in \<module\>
> from . import (
> ImportError: DLL load failed while importing \_device: The specified module could not be found.
> \`\`\`
> I'm pretty lost with this at this point! Any help would be much appreciated.
> 
> \### Checklist
> 
> \- \[\] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
> \- \[X\] Please \[format your issue\](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
> \- \[\] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
> \- \[X\] Please document the operating system you're running. If on Linux, please provide the specific distribution.

latest activity there 10h ago, so I guess it’s actively worked on.

Basically, if you install and build `IJulia` with julia version \> 1.8.3, it will not work (I tested only with 1.8.5). I removed `IJulia` and re-installed and rebuilt it using 1.8.3 and it worked.
