# Quarto Julia CLI: Kernel died before replying to kernel\_info

**URL:** <https://discourse.julialang.org/t/quarto-julia-cli-kernel-died-before-replying-to-kernel-info/91416>\
**Category:** New to Julia\
**Tags:** pkg, ijulia, environment, cli, quarto\
**Created:** [December 8, 2022, 8:53am UTC](https://discourse.julialang.org/t/quarto-julia-cli-kernel-died-before-replying-to-kernel-info/91416 "2022-12-08T08:53:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![fortunewalla](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fortunewalla/32/36960_2.png) [@fortunewalla](https://discourse.julialang.org/u/fortunewalla)\
**Post date:** [December 8, 2022, 8:53am UTC](https://discourse.julialang.org/t/quarto-julia-cli-kernel-died-before-replying-to-kernel-info/91416/1 "2022-12-08T08:53:48Z")

</div>

I wanted to try out quarto for Julia code.

1. I created an new Julia environment `q` and installed `IJulia.jl` and `Plots.jl`

2. The `jupyter kernelspec` & `quarto check` all seem fine.

3. when trying to render Julia example [Using Julia – Quarto](https://quarto.org/docs/computations/julia.html) it gives error message

```julia-auto
C:\julia110>quarto render jex.qmd
Starting julia-1.10 kernel...ERROR:

Kernel died before replying to kernel_info

```

1. How do I make jupyter and quarto use `IJulia` from the `q` project environment from the CLI?

### JUPYTER ERROR

```julia-auto
:\julia110>jupyter notebook                                                                                        
I 15:34:19.098 NotebookApp] Serving notebooks from local directory: d:\sw\julia110                                    
I 15:34:19.099 NotebookApp] Jupyter Notebook 6.4.0 is running at:                                                     
I 15:34:19.099 NotebookApp] http://localhost:8888/?token=388689f07367fe64f93c7c0ef28a25d996e9fe6079e69b25             
I 15:34:19.100 NotebookApp] or http://127.0.0.1:8888/?token=388689f07367fe64f93c7c0ef28a25d996e9fe6079e69b25         
I 15:34:19.100 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). 
C 15:34:19.275 NotebookApp]                                                                                           
                                                                                                                      
   To access the notebook, open this file in a browser:                                                               
       file:///C:/Users/julius/AppData/Roaming/jupyter/runtime/nbserver-29468-open.html                                    
   Or copy and paste one of these URLs:                                                                               
       http://localhost:8888/?token=388689f07367fe64f93c7c0ef28a25d996e9fe6079e69b25                                  
    or http://127.0.0.1:8888/?token=388689f07367fe64f93c7c0ef28a25d996e9fe6079e69b25                                  
I 15:34:32.208 NotebookApp] Creating new notebook in                                                                  
I 15:34:42.668 NotebookApp] Kernel started: 8f1d47d2-550f-4529-9d1f-1f0a28489d22, name: julia-1.10                    
RROR: LoadError: ArgumentError: Package IJulia not found in current path.                                             
 Run `import Pkg; Pkg.add("IJulia")` to install the IJulia package.                                                   
tacktrace:                                                                                                            
[1] macro expansion                                                                                                   
  @ .\loading.jl:1257 [inlined]                                                                                       
[2] macro expansion                                                                                                   
  @ .\lock.jl:267 [inlined]                                                                                           
[3] require(into::Module, mod::Symbol)                                                                                
  @ Base .\loading.jl:1238                                                                                            

```

### KERNELSPEC LIST

```julia-auto
C:\julia110>jupyter kernelspec list
Available kernels:
  julia-1.10 C:\Users\julius\AppData\Roaming\jupyter\kernels\julia-1.10
  wolframlanguage13.1 C:\Users\julius\AppData\Roaming\jupyter\kernels\wolframlanguage13.1
  python3 C:\python\app\python\share\jupyter\kernels\python3

```

### QUARTO CHECK

```julia-auto
C:\julia110>quarto check                             
                                                        
[>] Checking Quarto installation......OK                
      Version: 1.3.47                                   
      Path: C:\quarto\bin                            
      CodePage: 65001                                   
                                                        
[>] Checking basic markdown render....OK                
                                                        
[>] Checking Python 3 installation....OK                
      Version: 3.8.6                                    
      Path: C:/python/App/Python/python.exe          
      Jupyter: 4.7.1                                    
      Kernels: julia-1.10, wolframlanguage13.1, python3 
                                                        
[>] Checking Jupyter engine render....OK                
                                                        
[>] Checking R installation...........OK                
      Version: 4.2.2                                    
      Path: C:/R-Portable/App/R-Portable             
      LibPaths:                                         
        - C:/R-Portable/App/R-Portable/library       
      rmarkdown: 2.18                                   
                                                        
[>] Checking Knitr engine render......OK                
                                                        

```

---

<div class="post-metadata">

**Author:** ![fortunewalla](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fortunewalla/32/36960_2.png) [@fortunewalla](https://discourse.julialang.org/u/fortunewalla)\
**Post date:** [December 8, 2022, 10:49am UTC](https://discourse.julialang.org/t/quarto-julia-cli-kernel-died-before-replying-to-kernel-info/91416/3 "2022-12-08T10:49:34Z")

</div>

Yes, I did that much before.

```julia
julia> using Pkg; Pkg.build("IJulia")
    Building Conda ─→ `C:\julia110\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\6e47d11ea2776bc5627421d59cdcc1296c058071\build.log`
    Building IJulia → `C:\julia110\.julia\scratchspaces\44cfe95a-1eb2-52ea-b672-e2afdf69b78f\98ab633acb0fe071b671f6c1785c46cd70bb86bd\build.log`

```

---

<div class="post-metadata">

**Author:** ![fortunewalla](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fortunewalla/32/36960_2.png) [@fortunewalla](https://discourse.julialang.org/u/fortunewalla)\
**Post date:** [December 8, 2022, 1:51pm UTC](https://discourse.julialang.org/t/quarto-julia-cli-kernel-died-before-replying-to-kernel-info/91416/4 "2022-12-08T13:51:04Z")

</div>

After a lot of fiddling, the reason for this error is that when `IJulia` installs the jupyter kernel, it sets the project path to default i.e. `--project=@.` in the `C:\Users\julius\AppData\Roaming\jupyter\kernels\julia-1.10\kernel.json` file

```julia-auto
jupyter kernelspec list

julia-1.10 C:\Users\s\AppData\Roaming\jupyter\kernels\julia-1.10

```

We need to manually alter the file to change the project to the one we want as shown below. We have replaced `--project=@.` with `--project=q`

### kernel.json

```json
{
  "display_name": "Julia 1.10.0-DEV",
  "argv": [
    "c:\\julia110\\bin\\julia.exe",
    "-i",
    "--color=yes",
    "--project=q",
    "c:\\julia110\\.julia\\packages\\IJulia\\AQu2H\\src\\kernel.jl",
    "{connection_file}"
  ],
  "language": "julia",
  "env": {},
  "interrupt_mode": "message"
}

```

### original kernel.json

```json
{
  "display_name": "Julia 1.10.0-DEV",
  "argv": [
    "c:\\julia110\\bin\\julia.exe",
    "-i",
    "--color=yes",
    "--project=@.",
    "c:\\julia110\\.julia\\packages\\IJulia\\AQu2H\\src\\kernel.jl",
    "{connection_file}"
  ],
  "language": "julia",
  "env": {},
  "interrupt_mode": "message"
}

```

Now both `quarto` and `jupyter` are able to find `IJulia`.

---

<div class="post-metadata">

**Author:** ![henry2004y](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henry2004y/32/9284_2.png) [@henry2004y](https://discourse.julialang.org/u/henry2004y)\
**Post date:** [January 9, 2023, 11:13am UTC](https://discourse.julialang.org/t/quarto-julia-cli-kernel-died-before-replying-to-kernel-info/91416/5 "2023-01-09T11:13:45Z")

</div>

I have the same issue, but setting `--project=q` does not solve the problem for me on Linux (Btw: what does it mean?). IJulia works inside Julia REPL, and quarto check also says ok:

```julia
[✓] Checking Quarto installation......OK
      Version: 1.2.313
      Path: /opt/quarto/bin

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

[✓] Checking Python 3 installation....OK
      Version: 3.6.9
      Path: /usr/bin/python
      Jupyter: 4.9.2
      Kernels: python3, julia-1.8, python2

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

[✓] Checking R installation...........OK
      Version: 3.6.3
      Path: /usr/lib/R
      LibPaths:
        - /usr/local/lib/R/site-library
        - /usr/lib/R/site-library
        - /usr/lib/R/library
      rmarkdown: (None)

      The rmarkdown package is not available in this R installation.
      Install with install.packages("rmarkdown")

```

However I don’t encounter the issue on my Win11 laptop.

---

<div class="post-metadata">

**Author:** ![fortunewalla](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fortunewalla/32/36960_2.png) [@fortunewalla](https://discourse.julialang.org/u/fortunewalla)\
**Post date:** [January 9, 2023, 5:44pm UTC](https://discourse.julialang.org/t/quarto-julia-cli-kernel-died-before-replying-to-kernel-info/91416/6 "2023-01-09T17:44:08Z")

</div>

> setting `--project=q` does not solve the problem for me on Linux (Btw: what does it mean?)

TLDR: I guess I didn’t explain properly above but `q` is the name of the Julia project I created inside which I did install IJulia. You should substitute with the project name where IJulia is installed.

## Longer Explanation:

A Julia ‘project’ is equivalent to a conda ‘environment’. It is a self-contained directory contains your specific packages.

1. After starting julia, if you type `]`, it should take you to the package mode.
2. Here you should see something like `(@v1.10) pkg>` depending on your version. This is the default project environment of Julia. This corresponds to `--project=@.` in the JSON kernel file.
3. How this works inside Julia REPL is that:  
`]activate .` opens the current directory as the project environment.  
`]activate` opens the default julia project as the project environment.  
`]activate projname` opens the projname project as the project environment.
4. Say you created a project named `ijuliaproj` and installed IJulia in it, then you should use `--project=ijuliaproj` in the kernel JSON file.

Hope this helps some more. Let me know if you have any further difficulties. 👍

---

<div class="post-metadata">

**Author:** ![henry2004y](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/henry2004y/32/9284_2.png) [@henry2004y](https://discourse.julialang.org/u/henry2004y)\
**Post date:** [January 9, 2023, 7:11pm UTC](https://discourse.julialang.org/t/quarto-julia-cli-kernel-died-before-replying-to-kernel-info/91416/7 "2023-01-09T19:11:05Z")

</div>

Thanks for the explanation! But I guess if I install IJulia not inside my project but in global Julia environment, this should not matter?

I found [this issue](https://github.com/quarto-dev/quarto-julia/issues/3) reported in the quarto repo.

---

<div class="post-metadata">

**Author:** ![fortunewalla](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fortunewalla/32/36960_2.png) [@fortunewalla](https://discourse.julialang.org/u/fortunewalla)\
**Post date:** [January 10, 2023, 9:57am UTC](https://discourse.julialang.org/t/quarto-julia-cli-kernel-died-before-replying-to-kernel-info/91416/8 "2023-01-10T09:57:24Z")

</div>

These are two independent issues as far as I know.

1a. If IJulia is installed in the default environment, then you don’t need to tinker with the kernel JSON.

1b. If IJulia is installed in a project say `qq`, then you need to specify `qq` in the kernel JSON

2a) The kernel not starting was an IJulia problem because it only recognized till Juliav1.8. It gave that error for Juliav1.9 & Juliav1.10. We complained and it was finally fixed in [Kernel does not start with Julia 1.9 · Issue #1062 · JuliaLang/IJulia.jl · GitHub](https://github.com/JuliaLang/IJulia.jl/issues/1062)

2b) Now your issue is for quarto+IJulia. It could be a Linux issue. IDK.

For me the Windows 10, IJulia installed in `qq` project. So quarto works for the example in the Quarto website: [Using Julia – Quarto](https://quarto.org/docs/computations/julia.html)

It’s definitely not easy when the workflow consists of many tools!!

```julia-auto
julia> exit()

C:\julia110>quarto render document.qmd

Starting julia-1.10 kernel...Done

Executing 'document.ipynb'
  Cell 1/1...Done

pandoc
  to: html
  output-file: document.html
  standalone: true
  section-divs: true
  html-math-method: mathjax
  wrap: none
  default-image-extension: png

metadata
  document-css: false
  link-citations: true
  date-format: long
  lang: en
  title: Plots Demo
  author: Norah Jones
  date: 5/22/2021
  jupyter: julia-1.10

Output created: document.html

```

### This was the screenshot of output HTML file.

 ![image](https://global.discourse-cdn.com/julialang/original/3X/7/e/7ef61cb5f3603fb94dcffbe851136221bc373498.png)

---

<div class="post-metadata">

**Author:** ![TS-CUBED](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ts-cubed/32/25292_2.png) [@TS-CUBED](https://discourse.julialang.org/u/TS-CUBED)\
**Post date:** [March 17, 2023, 9:38am UTC](https://discourse.julialang.org/t/quarto-julia-cli-kernel-died-before-replying-to-kernel-info/91416/9 "2023-03-17T09:38:24Z")

</div>

Just a quick update, since it hasn’t been discussed here anymore:

This bug is fixed in Quarto 1.3.
