# Setting up Julia Kernel in Jupyter in VS Code

**URL:** https://discourse.julialang.org/t/setting-up-julia-kernel-in-jupyter-in-vs-code/52598
**Category:** New to Julia
**Created:** [December 30, 2020, 2:15am UTC](https://discourse.julialang.org/t/setting-up-julia-kernel-in-jupyter-in-vs-code/52598 "2020-12-30T02:15:44Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![brett\_knoss](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brett_knoss/32/13050_2.png) [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)
#### Post date: [December 30, 2020, 2:15am UTC](https://discourse.julialang.org/t/setting-up-julia-kernel-in-jupyter-in-vs-code/52598/1 "2020-12-30T02:15:45Z")

</div>

How do I set up a Julia kernal for Jupyter in VS Code? I’m should have the latest version of Julia set up in Ubuntu 20.10.

I also have inkscape set up, and will need to get things to work, so that I can export PDF.

---

<div class="post-metadata">

### Author: ![ImreSamu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/imresamu/32/20677_2.png) [@ImreSamu](https://discourse.julialang.org/u/ImreSamu)
#### Post date: [December 31, 2020, 1:31am UTC](https://discourse.julialang.org/t/setting-up-julia-kernel-in-jupyter-in-vs-code/52598/2 "2020-12-31T01:31:06Z")

</div>

I am just using the `jupyter/datascience-notebook` Docker images

- conda + julia kernel integrations included !!!
- and I can easily extend the images … adding other tools … ( like inkscape … )

_(NOT tested , but according the docs it should work)_  
just using the `jupyter/datascience-notebook` Docker images as a remote jupyter server ( running on via local Docker )  
**VS Code: “Connect to a remote Jupyter server”**  
_“You can offload intensive computation in a Jupyter notebook to other computers by connecting to a remote Jupyter server. Once connected, code cells run on the remote server rather than the local computer.”_

- " Run the **Jupyter: Specify local or remote Jupyter server for connections**"
- “Select how you would like to connect to a Jupyter server.”
- see more : [Working with Jupyter code cells in the Python Interactive window](https://code.visualstudio.com/docs/python/jupyter-support-py#_connect-to-a-remote-jupyter-server)

Hacker way : if the local install is important for you … Then you can check the Dockerfiles … and you can find some hints - for the Conda + Julia kernel setup

- [https://github.com/jupyter/docker-stacks/blob/master/datascience-notebook/Dockerfile](https://github.com/jupyter/docker-stacks/blob/master/datascience-notebook/Dockerfile)

if you can’t extend the `jupyter/datascience-notebook` docker images with “inkscape” … just ping me …

EDIT:

- see more: [https://github.com/jupyter/docker-stacks](https://github.com/jupyter/docker-stacks)

---

<div class="post-metadata">

### Author: ![brett\_knoss](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brett_knoss/32/13050_2.png) [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)
#### Post date: [January 10, 2021, 5:12am UTC](https://discourse.julialang.org/t/setting-up-julia-kernel-in-jupyter-in-vs-code/52598/3 "2021-01-10T05:12:34Z")

</div>

When I select add a kernel, I get

```julia
Command 'Jupyter: Select a Kernel' resulted in an error (Jupyter cannot be started. Error attempting to locate jupyter: Data Science libraries notebook and jupyter are not installed in interpreter Python 3.8.5 64-bit.)

```

so how do I add this library?

---

<div class="post-metadata">

### Author: ![brett\_knoss](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/brett_knoss/32/13050_2.png) [@brett\_knoss](https://discourse.julialang.org/u/brett_knoss)
#### Post date: [January 10, 2021, 5:16am UTC](https://discourse.julialang.org/t/setting-up-julia-kernel-in-jupyter-in-vs-code/52598/4 "2021-01-10T05:16:52Z")

</div>

I think I need a uri, but I’m not sure how to set one up.

---

<div class="post-metadata">

### Author: ![tamasgal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamasgal/32/27946_2.png) [@tamasgal](https://discourse.julialang.org/u/tamasgal)
#### Post date: [January 10, 2021, 9:31am UTC](https://discourse.julialang.org/t/setting-up-julia-kernel-in-jupyter-in-vs-code/52598/5 "2021-01-10T09:31:16Z")

</div>

Usually a `]add IJulia` and `]build IJulia` is enough to have a working Jupyter kernel, at least this has worked for me in the past years on all of the machines I was working on 😉

---

<div class="post-metadata">

### Author: ![ImreSamu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/imresamu/32/20677_2.png) [@ImreSamu](https://discourse.julialang.org/u/ImreSamu)
#### Post date: [January 10, 2021, 9:34am UTC](https://discourse.julialang.org/t/setting-up-julia-kernel-in-jupyter-in-vs-code/52598/6 "2021-01-10T09:34:42Z")

</div>

please write … your steps …  
because I can’t replicate … I can’t see what is your problem.

The `jupyter/datascience-notebook` is working ?

in the docker logs you can see the url + token … ( you can adapt the ip/port outside of docker )

```julia
Executing the command: jupyter notebook
[I 09:27:29.253 NotebookApp] Writing notebook server cookie secret to /home/jovyan/.local/share/jupyter/runtime/notebook_cookie_secret
[I 09:27:30.354 NotebookApp] JupyterLab extension loaded from /opt/conda/lib/python3.8/site-packages/jupyterlab
[I 09:27:30.354 NotebookApp] JupyterLab application directory is /opt/conda/share/jupyter/lab
[I 09:27:30.359 NotebookApp] Serving notebooks from local directory: /home/jovyan
[I 09:27:30.359 NotebookApp] Jupyter Notebook 6.1.6 is running at:
[I 09:27:30.359 NotebookApp] http://2b2564ebb23a:8888/?token=c6af62537fea4500ab55b19eb4d58ab7e22b5d91cdf1d66a
[I 09:27:30.359 NotebookApp] or http://127.0.0.1:8888/?token=c6af62537fea4500ab55b19eb4d58ab7e22b5d91cdf1d66a
[I 09:27:30.359 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 09:27:30.365 NotebookApp] 
    
    To access the notebook, open this file in a browser:
        file:///home/jovyan/.local/share/jupyter/runtime/nbserver-7-open.html
    Or copy and paste one of these URLs:
        http://2b2564ebb23a:8888/?token=c6af62537fea4500ab55b19eb4d58ab7e22b5d91cdf1d66a
     or http://127.0.0.1:8888/?token=c6af62537fea4500ab55b19eb4d58ab7e22b5d91cdf1d66a

```

---

<div class="post-metadata">

### Author: ![ImreSamu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/imresamu/32/20677_2.png) [@ImreSamu](https://discourse.julialang.org/u/ImreSamu)
#### Post date: [January 10, 2021, 11:05am UTC](https://discourse.julialang.org/t/setting-up-julia-kernel-in-jupyter-in-vs-code/52598/7 "2021-01-10T11:05:22Z")

</div>

> [@tamasgal](#):
>
> Usually a `]add IJulia` and `]build IJulia` is enough to have a working Jupyter kernel,

yes, it is working for me ( `ubuntu:20.04` )

- install jupyterlab: `pip3 install jupyterlab`
- add jupyter extension to VS: [Jupyter - Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter)
- add IJulia to Julia ( [GitHub - JuliaLang/IJulia.jl: Julia kernel for Jupyter](https://github.com/JuliaLang/IJulia.jl) )

VS Example ( for selecting Julia Kernel )

- [Jupyter - Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter)

my screenshot:

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