# PyPlot installation error related to libpython3.7m.dylib and libsystem\_kernel.dylib

**URL:** https://discourse.julialang.org/t/pyplot-installation-error-related-to-libpython3-7m-dylib-and-libsystem-kernel-dylib/17649
**Category:** New to Julia
**Created:** [November 17, 2018, 4:51pm UTC](https://discourse.julialang.org/t/pyplot-installation-error-related-to-libpython3-7m-dylib-and-libsystem-kernel-dylib/17649 "2018-11-17T16:51:24Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![josimar](https://avatars.discourse-cdn.com/v4/letter/j/cab0a1/32.png) [@josimar](https://discourse.julialang.org/u/josimar)
#### Post date: [November 17, 2018, 4:51pm UTC](https://discourse.julialang.org/t/pyplot-installation-error-related-to-libpython3-7m-dylib-and-libsystem-kernel-dylib/17649/1 "2018-11-17T16:51:24Z")

</div>

Hello,

I am trying to install PyPlot on the latest version of Julia (1.0) but I am getting the error below.

Note that this is a brand new installation of Julia. I made sure I deleted .julia folder before I performed the commands below. The exact line of commands that I am using are below.

This is a rather cumbersome error. Could someone help me to understand what could be going wrong ?

Thank you so much in advance,  
Josimar

> ENV[“PYTHON”]=“”  
> Pkg.add(“PyCall”)  
> Pkg.add(“PyPlot”)
> 
> using PyCall  
> pygui(:tk)  
> using PyPlot  
> pygui(true)
> 
> figure(“Test”)  
> clf()  
> plot(rand(10))

> 2018-11-17 10:36:05.109 julia[26233:13583963] -[NSApplication \_setup:]: unrecognized selector sent to instance 0x7f91c0d55380  
> 2018-11-17 10:36:05.111 julia[26233:13583963] \*\*\* Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[NSApplication \_setup:]: unrecognized selector sent to instance 0x7f91c0d55380’  
> \*\*\* First throw call stack:  
> (  
> 0 CoreFoundation 0x00007fff32a7c32b \_\_exceptionPreprocess + 171  
> 1 libobjc.A.dylib 0x00007fff5a0f6c76 objc\_exception\_throw + 48  
> 2 CoreFoundation 0x00007fff32b14e04 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132  
> 3 CoreFoundation 0x00007fff329f2870 _ **forwarding** _ + 1456  
> 4 CoreFoundation 0x00007fff329f2238 \_CF\_forwarding\_prep\_0 + 120  
> 5 libtk8.6.dylib 0x000000013a76331d TkpInit + 413  
> 6 libtk8.6.dylib 0x000000013a6bb17e Initialize + 2622  
> 7 \_tkinter.cpython-37m-darwin.so 0x000000013a4e3a0f \_tkinter\_create + 1183  
> 8 libpython3.7m.dylib 0x000000012898c2b9 \_PyMethodDef\_RawFastCallKeywords + 681  
> 9 libpython3.7m.dylib 0x000000012898c3bd \_PyCFunction\_FastCallKeywords + 45  
> 10 libpython3.7m.dylib 0x0000000128a95c4b call\_function + 603  
> 11 libpython3.7m.dylib 0x0000000128a8ce45 \_PyEval\_EvalFrameDefault + 7893  
> 12 libpython3.7m.dylib 0x0000000128a8aad9 \_PyEval\_EvalCodeWithName + 3305  
> 13 libpython3.7m.dylib 0x000000012898b1b1 \_PyFunction\_FastCallDict + 481  
> 14 libpython3.7m.dylib 0x000000012898cba4 \_PyObject\_Call\_Prepend + 164  
> 15 libpython3.7m.dylib 0x00000001289f45aa slot\_tp\_init + 298  
> 16 libpython3.7m.dylib 0x00000001289fdca7 type\_call + 295  
> 17 libpython3.7m.dylib 0x000000012898be73 \_PyObject\_FastCallKeywords + 691  
> 18 libpython3.7m.dylib 0x0000000128a95cb4 call\_function + 708  
> 19 libpython3.7m.dylib 0x0000000128a8cf6c \_PyEval\_EvalFrameDefault + 8188  
> 20 libpython3.7m.dylib 0x000000012898ba6e function\_code\_fastcall + 254  
> 21 libpython3.7m.dylib 0x0000000128a95cbe call\_function + 718  
> 22 libpython3.7m.dylib 0x0000000128a8ce45 \_PyEval\_EvalFrameDefault + 7893  
> 23 libpython3.7m.dylib 0x0000000128a8aad9 \_PyEval\_EvalCodeWithName + 3305  
> 24 libpython3.7m.dylib 0x000000012898b1b1 \_PyFunction\_FastCallDict + 481  
> 25 libpython3.7m.dylib 0x000000012898cba4 \_PyObject\_Call\_Prepend + 164  
> 26 libpython3.7m.dylib 0x000000012898e5b4 method\_call + 36  
> 27 libpython3.7m.dylib 0x000000012898c5b6 PyObject\_Call + 246  
> 28 libpython3.7m.dylib 0x0000000128a8d1b5 \_PyEval\_EvalFrameDefault + 8773  
> 29 libpython3.7m.dylib 0x0000000128a8aad9 \_PyEval\_EvalCodeWithName + 3305  
> 30 libpython3.7m.dylib 0x000000012898b1b1 \_PyFunction\_FastCallDict + 481  
> 31 ??? 0x000000012889351a 0x0 + 4975047962  
> 32 ??? 0x00000001288937ab 0x0 + 4975048619  
> 33 ??? 0x00000001288c0886 0x0 + 4975233158  
> 34 ??? 0x00000001288c0732 0x0 + 4975232818  
> 35 libjulia.1.0.dylib 0x000000010445960c eval\_body + 1228  
> 36 libjulia.1.0.dylib 0x0000000104459b58 jl\_interpret\_toplevel\_thunk\_callback + 408  
> 37 libjulia.1.0.dylib 0x00000001042ac76c enter\_interpreter\_frame + 28  
> 38 libjulia.1.0.dylib 0x00000001042c68bd jl\_toplevel\_eval\_flex + 1533  
> 39 libjulia.1.0.dylib 0x00000001042a1f9f jl\_parse\_eval\_all + 1279  
> 40 ??? 0x0000000128900cf8 0x0 + 4975496440  
> )  
> libc++abi.dylib: terminating with uncaught exception of type NSException

signal (6): Abort trap: 6  
in expression starting at Install.jl:16  
\_\_pthread\_kill at /usr/lib/system/libsystem\_kernel.dylib (unknown line)  
Allocations: 99120603 (Pool: 99098775; Big: 21828); GC: 223

---

<div class="post-metadata">

### Author: ![tkf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkf/32/17635_2.png) [@tkf](https://discourse.julialang.org/u/tkf)
#### Post date: [November 17, 2018, 7:15pm UTC](https://discourse.julialang.org/t/pyplot-installation-error-related-to-libpython3-7m-dylib-and-libsystem-kernel-dylib/17649/2 "2018-11-17T19:15:53Z")

</div>

FYI: [PSA: how to quote code with backticks](https://discourse.julialang.org/t/psa-how-to-quote-code-with-backticks/7530)

This looks like [PyPlot crashes Julia 1.0.1 on macOS Mojave · Issue #405 · JuliaPy/PyPlot.jl · GitHub](https://github.com/JuliaPy/PyPlot.jl/issues/405). You can workaround the issue by using Qt5Agg backend:  
[https://github.com/JuliaPy/PyPlot.jl/issues/405#issuecomment-436134944](https://github.com/JuliaPy/PyPlot.jl/issues/405#issuecomment-436134944)  
[https://github.com/JuliaPy/PyPlot.jl/issues/399#issuecomment-430592493](https://github.com/JuliaPy/PyPlot.jl/issues/399#issuecomment-430592493)
