# Running Julia (Jupyter) Notebooks inside VSCode

**URL:** <https://discourse.julialang.org/t/running-julia-jupyter-notebooks-inside-vscode/47421>\
**Category:** VS Code\
**Tags:** jupyter, vscode\
**Created:** [September 28, 2020, 5:00pm UTC](https://discourse.julialang.org/t/running-julia-jupyter-notebooks-inside-vscode/47421 "2020-09-28T17:00:46Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![stochastic\_guy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stochastic_guy/32/9877_2.png) [@stochastic\_guy](https://discourse.julialang.org/u/stochastic_guy)\
**Post date:** [September 28, 2020, 5:00pm UTC](https://discourse.julialang.org/t/running-julia-jupyter-notebooks-inside-vscode/47421/1 "2020-09-28T17:00:47Z")

</div>

> Rather than a question, this is a simple trick I found myself that might be useful for the whole community. I couldn’t find this information anywhere posted, hence sharing it here.

It is actually possible to run a jupyter notebook inside vscode. With the Python language vscode extension, you will be able to create new Jupyter notebooks inside vscode. Once a new notebook is created you can go and change the kernel to Julia. Now in the left bottom of your vscode window, you will see option to change the Interpreter. Click on it and point it to your julia.exe file.  
You are good to go!

If you know better workarounds, please share it here.  
PS: I really wish I could run Pluto notebooks inside vscode 🤠

---

<div class="post-metadata">

**Author:** ![Oto\_Brzobohaty](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oto_brzobohaty/32/10370_2.png) [@Oto\_Brzobohaty](https://discourse.julialang.org/u/Oto_Brzobohaty)\
**Post date:** [September 28, 2020, 5:21pm UTC](https://discourse.julialang.org/t/running-julia-jupyter-notebooks-inside-vscode/47421/2 "2020-09-28T17:21:23Z")

</div>

Cool. Do you have syntax highlighting of your julia code in Jupyter cells?

---

<div class="post-metadata">

**Author:** ![jlperla](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlperla/32/34332_2.png) [@jlperla](https://discourse.julialang.org/u/jlperla)\
**Post date:** [September 28, 2020, 5:24pm UTC](https://discourse.julialang.org/t/running-julia-jupyter-notebooks-inside-vscode/47421/3 "2020-09-28T17:24:37Z")

</div>

Syntax highlighting “out of the box” will require [https://github.com/microsoft/vscode/issues/105229](https://github.com/microsoft/vscode/issues/105229) but the workaround is that you can manually copy the files.

The other thing is that “variable explorer” which looks like it will need a setting. If you havea chance to try out [https://github.com/microsoft/vscode-python/issues/5078#issuecomment-683910271](https://github.com/microsoft/vscode-python/issues/5078#issuecomment-683910271) and report back on it, I am sure microsoft would be grateful.

---

<div class="post-metadata">

**Author:** ![ggarza](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ggarza/32/2654_2.png) [@ggarza](https://discourse.julialang.org/u/ggarza)\
**Post date:** [October 2, 2020, 2:53pm UTC](https://discourse.julialang.org/t/running-julia-jupyter-notebooks-inside-vscode/47421/4 "2020-10-02T14:53:41Z")

</div>

After selecting `~/.julia/conda/3/bin/python` as the interpreter, I get a message popup saying “Python 3.7.7 64-bit (‘3’: conda) requires ipykernel to be installed.”

---

<div class="post-metadata">

**Author:** ![jlperla](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlperla/32/34332_2.png) [@jlperla](https://discourse.julialang.org/u/jlperla)\
**Post date:** [October 2, 2020, 4:18pm UTC](https://discourse.julialang.org/t/running-julia-jupyter-notebooks-inside-vscode/47421/5 "2020-10-02T16:18:08Z")

</div>

> [@ggarza](#):
>
> I get a message popup saying “Python 3.7.7 64-bit (‘3’: conda) requires ipykernel to be installed.”

I haven’t tried doing it with the julia installed kernel. Did you try out jupyter notebooks with that conda installation without vscode? For example, does [GitHub - JuliaLang/IJulia.jl: Julia kernel for Jupyter](https://github.com/JuliaLang/IJulia.jl#quick-start) would fine?

If you do the `notebook()` call once, I bleieve that IJulia should install most or all of the dependencies?

---

<div class="post-metadata">

**Author:** ![ggarza](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ggarza/32/2654_2.png) [@ggarza](https://discourse.julialang.org/u/ggarza)\
**Post date:** [October 2, 2020, 4:46pm UTC](https://discourse.julialang.org/t/running-julia-jupyter-notebooks-inside-vscode/47421/6 "2020-10-02T16:46:25Z")

</div>

> [@jlperla](#):
>
> For example, does [GitHub - JuliaLang/IJulia.jl: Julia kernel for Jupyter](https://github.com/JuliaLang/IJulia.jl#quick-start) would fine?

Yes. I have been using Jupyter notebooks.

I found a solution to my issue:

```julia
using Pkg
Pkg.add("Conda")

using Conda
Conda.add("ipykernel")

```

Thanks anyway.

---

<div class="post-metadata">

**Author:** ![stochastic\_guy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stochastic_guy/32/9877_2.png) [@stochastic\_guy](https://discourse.julialang.org/u/stochastic_guy)\
**Post date:** [November 12, 2020, 3:25am UTC](https://discourse.julialang.org/t/running-julia-jupyter-notebooks-inside-vscode/47421/7 "2020-11-12T03:25:53Z")

</div>

They announced the new Jupyter extension for VSCode with support for Julia and R.

> **[Introducing the Jupyter Extension for VS Code - Python](https://devblogs.microsoft.com/python/introducing-the-jupyter-extension-for-vs-code/)**
>
> We’re excited to announce that we’re releasing the new Jupyter extension for Visual Studio Code today! The Jupyter extension is the latest step in our journey to bring the power of Jupyter Notebook into VS Code for a variety of languages and...

---

<div class="post-metadata">

**Author:** ![JontySinai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jontysinai/32/20760_2.png) [@JontySinai](https://discourse.julialang.org/u/JontySinai)\
**Post date:** [January 4, 2021, 4:01pm UTC](https://discourse.julialang.org/t/running-julia-jupyter-notebooks-inside-vscode/47421/8 "2021-01-04T16:01:21Z")

</div>

This didn’t work out of the box for me. For some reason my Julia kernelspec became corrupted (either through IJulia installation process or through VS Code extension updates). So as an additional step I had to ensure that the Julia kernel which Jupyter lists (and which VS Code will access) was set to the right Julia executable. You can do this by running `jupyter kernelspec list`, navigating to the directory of the Julia kernel you plan on using and editing the path in the `kernel.json` file. This path should be the same as the Julia path you may have provided in your VS Code user settings for the Julia extension.

---

<div class="post-metadata">

**Author:** ![Shuhua](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shuhua/32/27618_2.png) [@Shuhua](https://discourse.julialang.org/u/Shuhua)\
**Post date:** [January 10, 2021, 1:28pm UTC](https://discourse.julialang.org/t/running-julia-jupyter-notebooks-inside-vscode/47421/9 "2021-01-10T13:28:56Z")

</div>

My problem is that the syntax highlighting does not work.

- VS code 1.52.1 (latest at the time of writing)
- Julia 1.5.0
- IJulia v1.23.1
- Windows 10

Does anyone know how to fix this?

---

<div class="post-metadata">

**Author:** ![Shuhua](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shuhua/32/27618_2.png) [@Shuhua](https://discourse.julialang.org/u/Shuhua)\
**Post date:** [January 17, 2021, 3:46am UTC](https://discourse.julialang.org/t/running-julia-jupyter-notebooks-inside-vscode/47421/10 "2021-01-17T03:46:19Z")

</div>

Julia Jupyter Notebook worked in VS Code Insider for me on Windows 10 now.

 ![Snipaste_2021-01-17_11-44-57](https://global.discourse-cdn.com/julialang/original/3X/7/0/70790b6fb6a0ead05bfe1791f24b693d4694fe35.png)

The configuration is

- VS code [insider](https://code.visualstudio.com/insiders/) (the stable version does not work yet, see this [blog](https://devblogs.microsoft.com/python/introducing-the-jupyter-extension-for-vs-code/)) My version is insiders v 1.53.0
- Jupyter extension in VS code
- Julia extension in VS code (I also installed the insider version but don’t think it is necessary). This extension is required for syntax highlighting and IntelliSense.
- I am using Julia 1.6.0 beta, but Julia 1.5 also worked.

---

<div class="post-metadata">

**Author:** ![jlperla](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlperla/32/34332_2.png) [@jlperla](https://discourse.julialang.org/u/jlperla)\
**Post date:** [January 18, 2021, 3:09am UTC](https://discourse.julialang.org/t/running-julia-jupyter-notebooks-inside-vscode/47421/11 "2021-01-18T03:09:21Z")

</div>

Microsoft told me that the vscode insiders shouldn’t be required for the jupyter support.

BTW, I tested a few days ago and it all works perfectly fine without any conda or Python at all (i.e no need to install jupyter via Python , and it might even make things more fragile)

---

<div class="post-metadata">

**Author:** ![Shuhua](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/shuhua/32/27618_2.png) [@Shuhua](https://discourse.julialang.org/u/Shuhua)\
**Post date:** [January 18, 2021, 4:08am UTC](https://discourse.julialang.org/t/running-julia-jupyter-notebooks-inside-vscode/47421/12 "2021-01-18T04:08:03Z")

</div>

> [@jlperla](#):
>
> Microsoft told me that the vscode insiders shouldn’t be required for the jupyter support.

You are right. I just tested the latest stable version 1.52.1. The code can run normally. But the UI interface of the notebook is still the old one, and, even worse, the syntax highlighting is invalid.

 ![WeChat Image_20210118120503](https://global.discourse-cdn.com/julialang/original/3X/7/8/78adecf9e97b6066b7140b216f33a74baa37b4db.png)

---

<div class="post-metadata">

**Author:** ![Manuel\_Bergmann](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/manuel_bergmann/32/20174_2.png) [@Manuel\_Bergmann](https://discourse.julialang.org/u/Manuel_Bergmann)\
**Post date:** [March 21, 2021, 5:00pm UTC](https://discourse.julialang.org/t/running-julia-jupyter-notebooks-inside-vscode/47421/13 "2021-03-21T17:00:33Z")

</div>

I am currently on the stable version 1.53.2 of VSCode with Julia 1.5.3 and I have the exact same issues with it as described by @Shuhua (edit: platform is Windows 10): Code runs, but no syntax highlighting and also only old UI.  
Installed versions:

- VSCode (stable) 1.53.2
- Julia (on the system): 1.5.3
- Julia VS extension: 1.1.32
- Jupyter VS extension: v2021.2.603412351

 ![image](https://global.discourse-cdn.com/julialang/original/3X/9/0/9002760304f63476590930cba04c9b2c3ecb9364.png)

Again, with the current VS Code Insider version this works. Kinda. The syntax highlighting in many cases seems broken, especially string interpolations.

- VSCode (insider) 1.55.0
- Julia (on the system): 1.5.3
- Julia VS extension: 1.1.37
- Jupyter VS extension: v2021.4.641214696

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

Note the `2pi` marked red as well as the syntax highlighting for the string interpolation being broken.  
All those things work in regular .jl files in VS Code however:

![image](https://global.discourse-cdn.com/julialang/original/3X/3/9/39b5701e3a57880bfbf292079e8f2e2324f0e94b.png)

Out of interest I tried the string interpolation in nteract as well and here it was completely broken too (but in a different way):

![image](https://global.discourse-cdn.com/julialang/original/3X/c/0/c067d30f6989fea3141c0481c8c8b1fb42700341.png)

Am I missing something? Is there currently any notebook frontend for Julia, that provides correct syntax highlighting?

---

<div class="post-metadata">

**Author:** ![jlperla](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlperla/32/34332_2.png) [@jlperla](https://discourse.julialang.org/u/jlperla)\
**Post date:** [March 22, 2021, 5:33pm UTC](https://discourse.julialang.org/t/running-julia-jupyter-notebooks-inside-vscode/47421/14 "2021-03-22T17:33:42Z")

</div>

Post issues to [GitHub - microsoft/vscode-jupyter: VS Code Jupyter extension](https://github.com/microsoft/vscode-jupyter) . They are very responsive.

---

<div class="post-metadata">

**Author:** ![Manuel\_Bergmann](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/manuel_bergmann/32/20174_2.png) [@Manuel\_Bergmann](https://discourse.julialang.org/u/Manuel_Bergmann)\
**Post date:** [March 22, 2021, 7:08pm UTC](https://discourse.julialang.org/t/running-julia-jupyter-notebooks-inside-vscode/47421/15 "2021-03-22T19:08:38Z")

</div>

Thanks I reported it.

---

<div class="post-metadata">

**Author:** ![Manuel\_Bergmann](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/manuel_bergmann/32/20174_2.png) [@Manuel\_Bergmann](https://discourse.julialang.org/u/Manuel_Bergmann)\
**Post date:** [March 23, 2021, 1:55am UTC](https://discourse.julialang.org/t/running-julia-jupyter-notebooks-inside-vscode/47421/16 "2021-03-23T01:55:34Z")

</div>

They indeed were very responsive. For everyone encountering the same issues: My problem with the insiders syntax highlighting was, that even though the Julia kernel was used and run multiple times, the syntax highlighting was set to Python. In insiders you can now change this when you hover over a cell.

The issue with the current version of VS Code seems to be an old one and already reported by @jlperla - he wrote the solution to this down here: [Add configuration files for code highlighting · Issue #1620 · julia-vscode/julia-vscode · GitHub](https://github.com/julia-vscode/julia-vscode/issues/1620#issue-683938901) (I haven’t tested this yet though, since I like the new interface of VS Code Insiders better anyway. I might test it, if I encounter any sever bugs with Insiders) - I hope this will be a non-issue in a few months when the Insiders version of the Jupyter implementation becomes standard.

Thanks again for your help! 🙂

---

<div class="post-metadata">

**Author:** ![jkelleyrtp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jkelleyrtp/32/24851_2.png) [@jkelleyrtp](https://discourse.julialang.org/u/jkelleyrtp)\
**Post date:** [May 7, 2021, 6:47am UTC](https://discourse.julialang.org/t/running-julia-jupyter-notebooks-inside-vscode/47421/17 "2021-05-07T06:47:54Z")

</div>

How did you guys get inline plots working? Mine show up in a side window which is taking a bunch of screen real-estate on my laptop.
