# Unable to use PyPlot either in Jupyter notebook or in terminal

**URL:** https://discourse.julialang.org/t/unable-to-use-pyplot-either-in-jupyter-notebook-or-in-terminal/60126
**Category:** Visualization
**Tags:** jupyter, pyplot, ijulia
**Created:** [April 27, 2021, 8:33pm UTC](https://discourse.julialang.org/t/unable-to-use-pyplot-either-in-jupyter-notebook-or-in-terminal/60126 "2021-04-27T20:33:01Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![KK\_JuliaNoob](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@KK\_JuliaNoob](https://discourse.julialang.org/u/KK_JuliaNoob)
#### Post date: [April 27, 2021, 8:33pm UTC](https://discourse.julialang.org/t/unable-to-use-pyplot-either-in-jupyter-notebook-or-in-terminal/60126/1 "2021-04-27T20:33:01Z")

</div>

I am on a Macbook pro with Big Sur, and I recently switched to Julia 1.6

When I tried to use the PyPlot package from a jupyter notebook, it keeps resetting the Julia kernel, and is unusable. Other Julia packages work fine in Jupyter.

When I try to use PyPlot in the terminal I get this error:

```julia
INTEL MKL ERROR: dlopen(/Users/kamesh/.julia/conda/3/lib/libmkl_intel_thread.1.dylib, 9): Library not loaded: @rpath/libiomp5.dylib
  Referenced from: /Users/kamesh/.julia/conda/3/lib/libmkl_intel_thread.1.dylib
  Reason: image not found.
Intel MKL FATAL ERROR: Cannot load libmkl_intel_thread.1.dylib.

```

With an earlier version of Julia (1.5.3) and an older PyPlot, I was happily using them together.  
What’s making things break so much in the recent version?

---

<div class="post-metadata">

### Author: ![KK\_JuliaNoob](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@KK\_JuliaNoob](https://discourse.julialang.org/u/KK_JuliaNoob)
#### Post date: [April 27, 2021, 8:45pm UTC](https://discourse.julialang.org/t/unable-to-use-pyplot-either-in-jupyter-notebook-or-in-terminal/60126/2 "2021-04-27T20:45:51Z")

</div>

I checked that

```julia
@pyimport matplotlib

```

is the main culprit.

---

<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: [April 28, 2021, 5:12am UTC](https://discourse.julialang.org/t/unable-to-use-pyplot-either-in-jupyter-notebook-or-in-terminal/60126/3 "2021-04-28T05:12:25Z")

</div>

There are known issues with MKL and Pyplot, see here for some possible solutions

> [@Intel MKL FATAL ERROR with PyPlot](https://discourse.julialang.org/t/intel-mkl-fatal-error-with-pyplot/36737/9):
>
> Modifying .zshrc with the following works : addToPATH () { export LD\_LIBRARY\_PATH="$1:$LD\_LIBRARY\_PATH" } addToPATH ~/.julia/conda/3/lib
