I wanted to try out quarto for Julia code.
I created an new Julia environment
q and installed
jupyter kernelspec &
quarto check all seem fine.
when trying to render Julia example Quarto - Using Julia it gives error message
C:\julia110>quarto render jex.qmd
Starting julia-1.10 kernel...ERROR:
Kernel died before replying to kernel_info
- How do I make jupyter and quarto use
IJulia from the
q project environment from the CLI?
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:
Or copy and paste one of these URLs:
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.
 macro expansion
@ .\loading.jl:1257 [inlined]
 macro expansion
@ .\lock.jl:267 [inlined]
 require(into::Module, mod::Symbol)
@ Base .\loading.jl:1238
C:\julia110>jupyter kernelspec list
[>] Checking Quarto installation......OK
[>] Checking basic markdown render....OK
[>] Checking Python 3 installation....OK
Kernels: julia-1.10, wolframlanguage13.1, python3
[>] Checking Jupyter engine render....OK
[>] Checking R installation...........OK
[>] Checking Knitr engine render......OK
Yes, I did that much before.
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`
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
jupyter kernelspec list
We need to manually alter the file to change the project to the one we want as shown below. We have replaced
"display_name": "Julia 1.10.0-DEV",
"display_name": "Julia 1.10.0-DEV",
jupyter are able to find
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:
[✓] Checking Quarto installation......OK
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Kernels: python3, julia-1.8, python2
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
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.
--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.
A Julia ‘project’ is equivalent to a conda ‘environment’. It is a self-contained directory contains your specific packages.
- After starting julia, if you type
], it should take you to the package mode.
- 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.
- 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.
- 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.
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 reported in the quarto repo.
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
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: Quarto - Using Julia
It’s definitely not easy when the workflow consists of many tools!!
C:\julia110>quarto render document.qmd
Starting julia-1.10 kernel...Done
title: Plots Demo
author: Norah Jones
Output created: document.html
This was the screenshot of output HTML file.