# How to use GLMakie in jupyter notebook?

**URL:** <https://discourse.julialang.org/t/how-to-use-glmakie-in-jupyter-notebook/83552>\
**Category:** New to Julia\
**Tags:** plotting\
**Created:** [June 30, 2022, 6:22am UTC](https://discourse.julialang.org/t/how-to-use-glmakie-in-jupyter-notebook/83552 "2022-06-30T06:22:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZiyiLiu](https://avatars.discourse-cdn.com/v4/letter/z/7993a0/32.png) [@ZiyiLiu](https://discourse.julialang.org/u/ZiyiLiu)\
**Post date:** [June 30, 2022, 6:22am UTC](https://discourse.julialang.org/t/how-to-use-glmakie-in-jupyter-notebook/83552/1 "2022-06-30T06:22:54Z")

</div>

Hi, I am studying julia from yesterday, and I met a question when using GLMakie and python together in jupyter notebook.

Then problem is that I can’t use ‘using Makie’ in my code. The error is in the picture below.

Also, I want to rotate my 3D plot, however, the Makie is always ‘not responding’ after I use ‘display(fig1)’.

Could you please help me with this? Thanks!

Best,  
Ziyi

 ![Screenshot 2022-06-30 022242](https://global.discourse-cdn.com/julialang/original/3X/b/2/b2d6146f5b4a6fa69a89f6ef58e20eaae0ed9b68.png)

---

<div class="post-metadata">

**Author:** ![garrek](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/garrek/32/27937_2.png) [@garrek](https://discourse.julialang.org/u/garrek)\
**Post date:** [June 30, 2022, 6:38am UTC](https://discourse.julialang.org/t/how-to-use-glmakie-in-jupyter-notebook/83552/2 "2022-06-30T06:38:42Z")

</div>

Do you have to call Julia methods from Python? Have you tried / want to use Julia directly? (Jupyter notebooks support native Julia code.)

---

<div class="post-metadata">

**Author:** ![ZiyiLiu](https://avatars.discourse-cdn.com/v4/letter/z/7993a0/32.png) [@ZiyiLiu](https://discourse.julialang.org/u/ZiyiLiu)\
**Post date:** [June 30, 2022, 6:40am UTC](https://discourse.julialang.org/t/how-to-use-glmakie-in-jupyter-notebook/83552/3 "2022-06-30T06:40:50Z")

</div>

Hi,  
I don’t have to call Julia methods, but I used Julia directly and its doesn’t work.  
For example, I just used ‘using GLMakie’ in a python3, but it has the same error in the picture above.  
How do I use julia directly? Thanks!

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [June 30, 2022, 7:04am UTC](https://discourse.julialang.org/t/how-to-use-glmakie-in-jupyter-notebook/83552/5 "2022-06-30T07:04:29Z")

</div>

Well `using GLMakie` is Julia syntax, which of course is not understood by the Python parser. If you want to use Julia syntax you have to use Julia rather than Python, i.e. run a Julia kernel in your Jupyter notebook (via `IJulia`)

---

<div class="post-metadata">

**Author:** ![garrek](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/garrek/32/27937_2.png) [@garrek](https://discourse.julialang.org/u/garrek)\
**Post date:** [June 30, 2022, 7:04am UTC](https://discourse.julialang.org/t/how-to-use-glmakie-in-jupyter-notebook/83552/6 "2022-06-30T07:04:59Z")

</div>

First, you have to download Julia for your system:

> **[Download Julia](https://julialang.org/downloads/)**
>
> The official website for the Julia Language. Julia is a language that is fast, dynamic, easy to use, and open source. Click here to learn more.

Next you have to add the IJulia package (the Julia backend for Jupyter).

Open Julia (by clicking on the application icon or open a terminal and type `julia`. This is the Julia REPL. Type `]` and then `add IJulia`. This will link Julia to Jupyter.

Now you should be able to select Julia from the list of kernels.

 ![Screen Shot 2022-06-30 at 16.03.47](https://global.discourse-cdn.com/julialang/original/3X/5/e/5ea1a3bd3f01ed4bb6d7faa0af7be16a12b4c209.png)

There is a nice longer tutorial here: [1. Setting up Your Julia Environment — Quantitative Economics with Julia](https://julia.quantecon.org/getting_started_julia/getting_started.html)

which also has a section on using Jupyter in Visual Studio Code, which is quite nice. (Using only Jupyter is at the bottom of the tutorial at section 1.10)

**Note**  
You have to use Julia syntax. In your example you are using Python, Numpy, and matplotlib syntax (like `np.sin()` and `plt.figure()`). Check out the Makie basic tutorials and examples for how to make plots: [Makie homepage](https://makie.juliaplots.org/stable/)

---

<div class="post-metadata">

**Author:** ![ZiyiLiu](https://avatars.discourse-cdn.com/v4/letter/z/7993a0/32.png) [@ZiyiLiu](https://discourse.julialang.org/u/ZiyiLiu)\
**Post date:** [June 30, 2022, 7:11am UTC](https://discourse.julialang.org/t/how-to-use-glmakie-in-jupyter-notebook/83552/7 "2022-06-30T07:11:10Z")

</div>

Thanks very much! It’s very clear!
