Trouble using plots (on macOS)

And now the next blow I realised pyplot() wouldn’t work on my OSX Ventura.

Recap:

  1. Using Plots; pyplot() works on Linux
  2. using Plots without pyplot() works on my Ventura (e.g. import Plots as plt; plt.rand(23))
  3. using Plots without pyplot() doesn’t work on my work Linux (not tried your empty directory yet)

The following on Ventura will crash the Julia session and I am thrown out from the session and end up with the bash terminal:

julia> using Plots

julia> pyplot()

Plots.PyPlotBackend()

julia> plot(rand(23))

objc[12297]: Class QCocoaPageLayoutDelegate is implemented in both /Users/me/.julia/artifacts/5cb67771651635f5ac02f3a60017effcbeebb119/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport (0x177060480) and /Users/me/.julia/conda/3/lib/libQt5PrintSupport.5.12.9.dylib (0x1de1f43b0). One of the two will be used. Which one is undefined.

objc[12297]: Class QCocoaPrintPanelDelegate is implemented in both /Users/me/.julia/artifacts/5cb67771651635f5ac02f3a60017effcbeebb119/lib/QtPrintSupport.framework/Versions/5/QtPrintSupport (0x1770604f8) and /Users/me/.julia/conda/3/lib/libQt5PrintSupport.5.12.9.dylib (0x1de1f4428). One of the two will be used. Which one is undefined.

qt.qpa.drawing: Layer-backing can not be explicitly controlled on 10.14 when built against the 10.14 SDK

signal (11): Segmentation fault: 11

in expression starting at none:0

_ZNK7QObject6threadEv at /Users/me/.julia/artifacts/5cb67771651635f5ac02f3a60017effcbeebb119/lib/QtCore.framework/Versions/5/QtCore (unknown line)

_ZN22QWindowSystemInterface17handleExposeEventINS_19SynchronousDeliveryEEEvP7QWindowRK7QRegion at /Users/me/.julia/artifacts/5cb67771651635f5ac02f3a60017effcbeebb119/lib/QtGui.framework/Versions/5/QtGui (unknown line)

qt_plugin_instance at /Users/me/.julia/conda/3/plugins/platforms/libqcocoa.dylib (unknown line)

qt_plugin_instance at /Users/me/.julia/conda/3/plugins/platforms/libqcocoa.dylib (unknown line)

-[_NSBackingLayer display] at /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (unknown line)

-[_NSViewBackingLayer display] at /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (unknown line)

_ZN2CA5Layer17display_if_neededEPNS_11TransactionE at /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore (unknown line)

_ZN2CA7Context18commit_transactionEPNS_11TransactionEdPd at /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore (unknown line)

_ZN2CA11Transaction6commitEv at /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore (unknown line)

__62+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayLink]_block_invoke at /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (unknown line)

___NSRunLoopObserverCreateWithHandler_block_invoke at /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (unknown line)

CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION at /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (unknown line)

__CFRunLoopDoObservers at /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (unknown line)

__CFRunLoopRun at /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (unknown line)

CFRunLoopRunSpecific at /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (unknown line)

RunCurrentEventLoopInMode at /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox (unknown line)

ReceiveNextEventCommon at /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox (unknown line)

_BlockUntilNextEventMatchingListInModeWithFilter at /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox (unknown line)

_DPSNextEvent at /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (unknown line)

-[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] at /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (unknown line)

-[NSApplication run] at /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (unknown line)

qt_plugin_instance at /Users/me/.julia/conda/3/plugins/platforms/libqcocoa.dylib (unknown line)

qt_plugin_instance at /Users/me/.julia/conda/3/plugins/platforms/libqcocoa.dylib (unknown line)

_ZN16QCoreApplication13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEEi at /Users/me/.julia/conda/3/lib/libQt5Core.5.12.9.dylib (unknown line)

ZL35meth_QCoreApplication_processEventsP7_objectS0_S0 at /Users/me/.julia/conda/3/lib/python3.9/site-packages/PyQt5/QtCore.so (unknown line)

cfunction_call at /Users/me/.julia/conda/3/lib/libpython3.9.dylib (unknown line)

_PyObject_Call at /Users/me/.julia/conda/3/lib/libpython3.9.dylib (unknown line)

macro expansion at /Users/me/.julia/packages/PyCall/ygXW2/src/exception.jl:95 [inlined]

#107 at /Users/me/.julia/packages/PyCall/ygXW2/src/pyfncall.jl:43 [inlined]

disable_ment at ./c.jl:473 [inlined]

__pycall! at /Users/me/.julia/packages/PyCall/ygXW2/src/pyfncall.jl:42 [inlined]

_pycall! at /Users/me/.julia/packages/PyCall/ygXW2/src/pyfncall.jl:29

_pycall! at /Users/me/.julia/packages/PyCall/ygXW2/src/pyfncall.jl:11 [inlined]

#pycall#112 at /Users/me/.julia/packages/PyCall/ygXW2/src/pyfncall.jl:80 [inlined]

pycall at /Users/me/.julia/packages/PyCall/ygXW2/src/pyfncall.jl:80 [inlined]

#3 at /Users/me/.julia/packages/PyCall/ygXW2/src/gui.jl:154

macro expansion at ./asyncevent.jl:281 [inlined]

#666 at ./task.jl:134

unknown function (ip: 0x10f29072f)

ijl_apply_generic at /Applications/Julia-1.8.2.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.8.dylib (unknown line)

start_task at /Applications/Julia-1.8.2.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.8.dylib (unknown line)

Allocations: 50233261 (Pool: 50209709; Big: 23552); GC: 36

signal (11): Segmentation fault: 11

in expression starting at none:0

import_get_module at /Users/me/.julia/conda/3/lib/libpython3.9.dylib (unknown line)

_PyImport_GetModuleId at /Users/me/.julia/conda/3/lib/libpython3.9.dylib (unknown line)

wait_for_thread_shutdown at /Users/me/.julia/conda/3/lib/libpython3.9.dylib (unknown line)

Py_FinalizeEx at /Users/me/.julia/conda/3/lib/libpython3.9.dylib (unknown line)

Py_Finalize at /Users/me/.julia/packages/PyCall/ygXW2/src/pyinit.jl:125

unknown function (ip: 0x1e2c0fd0f)

ijl_apply_generic at /Applications/Julia-1.8.2.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.8.dylib (unknown line)

_atexit at ./initdefs.jl:372

unknown function (ip: 0x1e2c0f1af)

ijl_apply_generic at /Applications/Julia-1.8.2.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.8.dylib (unknown line)

ijl_atexit_hook at /Applications/Julia-1.8.2.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.8.dylib (unknown line)

ijl_exit at /Applications/Julia-1.8.2.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.8.dylib (unknown line)

jl_exit_thread0_cb at /Applications/Julia-1.8.2.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.8.dylib (unknown line)

Allocations: 51899495 (Pool: 51875245; Big: 24250); GC: 37

signal (11): Segmentation fault: 11

in expression starting at none:0

meth_dealloc at /Users/me/.julia/conda/3/lib/libpython3.9.dylib (unknown line)

pydecref_ at /Users/me/.julia/packages/PyCall/ygXW2/src/PyCall.jl:118 [inlined]

pydecref at /Users/me/.julia/packages/PyCall/ygXW2/src/PyCall.jl:123

unknown function (ip: 0x10f23f776)

ijl_apply_generic at /Applications/Julia-1.8.2.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.8.dylib (unknown line)

run_finalizer at /Applications/Julia-1.8.2.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.8.dylib (unknown line)

jl_gc_run_finalizers_in_list at /Applications/Julia-1.8.2.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.8.dylib (unknown line)

run_finalizers at /Applications/Julia-1.8.2.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.8.dylib (unknown line)

ijl_atexit_hook at /Applications/Julia-1.8.2.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.8.dylib (unknown line)

ijl_exit at /Applications/Julia-1.8.2.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.8.dylib (unknown line)

jl_exit_thread0_cb at /Applications/Julia-1.8.2.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.8.dylib (unknown line)

Allocations: 51899495 (Pool: 51875245; Big: 24250); GC: 37

The files and libs in the directory 5cb67771651635f5ac02f3a60017effcbeebb119/lib have time stamps dating back to the 10th Nov 2022

I cannot remember if I had to build pyplot upon first use 2 days ago and it was pointing to the system wide Python which is different to the one in my .julia/conda/3.

Can you try with the approach @mcreel mentioned (especially the Pkg and activate part in some empty directory)?

You seem to have several packages installed and here two providing the same Qt stuff. Then it is helpful to have a local environment with not so many packages.

In general having an environment (read about the Pkg.activate) is something I recommend also for reproducibility, since that ensures that you get back to the same versions of packages in that folder whenever you activate that environment again.

In other notes, the proposed code by @mcreel works fine for me on Mac OS Ventura.

PS: for code here on discord it helps with readability if you put it in three backtracks like

```
using Plots
[... my code ...]
```

which looks here like

using Plots
[... my code ...]
2 Likes

Plots can get complicated. I understand your frustration. I think we need to start with some basic diagnostics though.

In the standard configuration, the Julia packaging system provides the entire binary stack to try to work around potential system issues, including QT. Something is preventing the packaged binaries from loading other packaged binaries they were intended to work with.

The following will help us understand what package versions are being used by Julia. One complication could simply be that your current environment is using outdated versions of packages without some bug fixes.

using InteractiveUtils
versioninfo()
using Pkg
pkg"status -m"
get(ENV, "LD_LIBRARY_PATH", "not set")
get(ENV, "DYLD_LIBRARY_PATH", "not set")

Hi mkitti

The long awaited output of the commands you asked me to type in on my macOS Ventura 13.0:

julia> using InteractiveUtils

julia> versioninfo()
Julia Version 1.8.2
Commit 36034abf260 (2022-09-29 15:21 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin21.4.0)
CPU: 8 × Apple M1
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-13.0.1 (ORCJIT, westmere)
Threads: 1 on 8 virtual cores
Environment:
DYLD_FALLBACK_LIBRARY_PATH = /Users/prodigy/.julia/artifacts/979f68ce65b087a39297a97d21aec04b1d4e9d24/lib:/Users/prodigy/.julia/artifacts/571cdee3242d2dddfc82ce9b2b9a25ba523c78e9/lib:/Users/prodigy/.julia/artifacts/dcc1b7719d5a106fba77bbc272d231e163d15fe5/lib:/Applications/Julia-1.8.2.app/Contents/Resources/julia/lib/julia:/Users/prodigy/.julia/artifacts/ff3a519cd5338603e027bb508416673c2c28e6b9/lib:/Users/prodigy/.julia/artifacts/397fee52d94fc3404c3e466a6a8277ad9fdde715/lib:/Users/prodigy/.julia/artifacts/2be77ffa9a848f4e33c1f669df27f107a20e895f/lib:/Users/prodigy/.julia/artifacts/5d8d2f8a7579b33069ae2ae9079c4523d1947d13/lib:/Users/prodigy/.julia/artifacts/9194d75745cbb36d5b00e2b1891b2ec6e8c1e2b5/lib:/Users/prodigy/.julia/artifacts/efdd3b2e618e4acb959083d2af453a91551b04e9/lib:/Users/prodigy/.julia/artifacts/3bb83a2812f716f0d1610026d1e470dbf92a952e/lib:/Users/prodigy/.julia/artifacts/2cb0d96a63120d1a0868c905452895a59add9a0d/lib:/Users/prodigy/.julia/artifacts/f9fc72c9167a476e5c5fec8942270c90e0ffc796/lib:/Users/prodigy/.julia/artifacts/ed6b32736e29cb60fa5bf838e140f50a6f4e09e6/lib:/Users/prodigy/.julia/artifacts/946f590bc9f9b0b0b7978a8481f067c6e611c522/lib:/Users/prodigy/.julia/artifacts/fb5ebcbea6d2f03cf79fe1bf6aa237f4929b1d2d/lib:/Users/prodigy/.julia/artifacts/3a10d140fdfe84ac9bebb570319e9d173d5c7e6c/lib:/Users/prodigy/.julia/artifacts/f9f9209aaba179c03a71fa49432487fbe41daac8/lib:/Users/prodigy/.julia/artifacts/d4387ba5551f47f3733c2b041a7745c29b35c26e/lib:/Users/prodigy/.julia/artifacts/fe0276d289339d47a28d300125365cc9bcd019b7/lib:/Users/prodigy/.julia/artifacts/13d72f9c10469b24ae6ed7dd1a3b2ab5338ae2ab/lib:/Users/prodigy/.julia/artifacts/572714f8bb8cb23efde4bcd230b638bc3cd7ef00/lib:/Users/prodigy/.julia/artifacts/e82fc967ae7f655963b97d4565e3a93c74bd38fa/lib:/Users/prodigy/.julia/artifacts/966098580a6feebc43e729bf20dbb97848be4663/lib:/Users/prodigy/.julia/artifacts/bbb69711f9eab313bab4f202da8fbae8c1914a96/lib:/Users/prodigy/.julia/artifacts/f8a8563518ab10e9a9c9639e3f7334be68d5e04b/lib:/Users/prodigy/.julia/artifacts/a50227ae6f693d36e10f6515b7b5d601791f2d20/lib:/Users/prodigy/.julia/artifacts/1e28bb4254c27b51008f9e1839edee3406036044/lib:/Users/prodigy/.julia/artifacts/54253779fac0a65601dab59d1e7249b501ff9f71/lib:/Users/prodigy/.julia/artifacts/f8a9dc14e1939d9682af2c038464fd76c93ccf7d/lib:/Users/prodigy/.julia/artifacts/d3f66a1beb37e7d6778ecff998c64c2807d19c9f/lib:/Users/prodigy/.julia/artifacts/2052a4bef64c555c78e154a23af351725ced4885/lib:/Users/prodigy/.julia/artifacts/ecab94b6925ea0d5e3a0e3d59e3620339ea3f463/lib:/Users/prodigy/.julia/artifacts/5cb67771651635f5ac02f3a60017effcbeebb119/lib/QtConcurrent.framework/Versions/5:/Users/prodigy/.julia/artifacts/5cb67771651635f5ac02f3a60017effcbeebb119/lib/QtCore.framework/Versions/5:/Users/prodigy/.julia/artifacts/5cb67771651635f5ac02f3a60017effcbeebb119/lib/QtDBus.framework/Versions/5:/Users/prodigy/.julia/artifacts/5cb67771651635f5ac02f3a60017effcbeebb119/lib/QtGui.framework/Versions/5:/Users/prodigy/.julia/artifacts/5cb67771651635f5ac02f3a60017effcbeebb119/lib/QtNetwork.framework/Versions/5:/Users/prodigy/.julia/artifacts/5cb67771651635f5ac02f3a60017effcbeebb119/lib/QtOpenGL.framework/Versions/5:/Users/prodigy/.julia/artifacts/5cb67771651635f5ac02f3a60017effcbeebb119/lib/QtPrintSupport.framework/Versions/5:/Users/prodigy/.julia/artifacts/5cb67771651635f5ac02f3a60017effcbeebb119/lib/QtSql.framework/Versions/5:/Users/prodigy/.julia/artifacts/5cb67771651635f5ac02f3a60017effcbeebb119/lib/QtTest.framework/Versions/5:/Users/prodigy/.julia/artifacts/5cb67771651635f5ac02f3a60017effcbeebb119/lib/QtWidgets.framework/Versions/5:/Users/prodigy/.julia/artifacts/5cb67771651635f5ac02f3a60017effcbeebb119/lib/QtXml.framework/Versions/5:/Users/prodigy/.julia/artifacts/8255c706e5d1047f05d10411167d923e31536d23/lib:/Applications/Julia-1.8.2.app/Contents/Resources/julia/bin/…/lib/julia:/Applications/Julia-1.8.2.app/Contents/Resources/julia/bin/…/lib:

julia> using Pkg

julia> pkg"status -m"
Status ~/.julia/environments/v1.8/Manifest.toml
⌃ [d1d4a3ce] BitFlags v0.1.5
[159f3aea] Cairo v1.0.5
[d360d2e6] ChainRulesCore v1.15.6
[9e997f8a] ChangesOfVariables v0.1.4
[944b1d66] CodecZlib v0.7.0
[35d6a980] ColorSchemes v3.19.0
[3da002f7] ColorTypes v0.11.4
[c3611d14] ColorVectorSpace v0.9.9
[5ae59095] Colors v0.12.8
[34da2185] Compat v4.3.0
[8f4d0f93] Conda v1.7.0
[d38c429a] Contour v0.6.2
[9a962f9c] DataAPI v1.13.0
[864edb3b] DataStructures v0.18.13
[ffbed154] DocStringExtensions v0.9.2
[c87230d0] FFMPEG v0.4.1
[5789e2e9] FileIO v1.16.0
[53c48c17] FixedPointNumbers v0.8.4
[59287772] Formatting v0.4.2
⌅ [28b8d3ca] GR v0.69.5
[a2bd30eb] Graphics v1.1.2
[42e2da0e] Grisu v1.0.2
[cd3eb016] HTTP v1.5.3
[83e8ac13] IniFile v0.5.1
[3587e190] InverseFunctions v0.1.8
[92d709cd] IrrationalConstants v0.1.1
[1019f520] JLFzf v0.1.5
[692b3bcd] JLLWrappers v1.4.1
[682c06a0] JSON v0.21.3
⌃ [78b212ba] Javis v0.1.5
[e5e0dc1b] Juno v0.8.4
[b964fa9f] LaTeXStrings v1.3.0
[23fbe1c1] Latexify v0.15.17
[9c8b4983] LightXML v0.9.0
[2ab3a3ac] LogExpFunctions v0.3.18
[e6f89c97] LoggingExtras v0.4.9
⌅ [ae8d54c2] Luxor v2.19.0
[1914dd2f] MacroTools v0.5.10
[739be429] MbedTLS v1.1.7
[442fdcdd] Measures v0.3.1
[e89f7d12] Media v0.5.0
[e1d29d7a] Missings v1.0.2
[77ba4419] NaNMath v1.0.1
[4d8831e6] OpenSSL v1.3.1
[bac558e1] OrderedCollections v1.4.1
[69de0a69] Parsers v2.5.0
[b98c9c47] Pipe v1.3.0
[ccf2f8ad] PlotThemes v3.1.0
[995b91a9] PlotUtils v1.3.1
[91a5bcdd] Plots v1.36.1
[21216c6a] Preferences v1.3.0
[438e738f] PyCall v1.94.1
[d330b81b] PyPlot v2.11.0
[3cdcf5f2] RecipesBase v1.3.1
[01d81517] RecipesPipeline v0.6.10
[189a3867] Reexport v1.2.2
[05181044] RelocatableFolders v1.0.0
[ae029012] Requires v1.3.0
[c4c386cf] Rsvg v1.0.0
[6c6a2e73] Scratch v1.1.1
[992d4aef] Showoff v1.0.3
[777ac1f9] SimpleBufferStream v1.1.0
[66db9d55] SnoopPrecompile v1.0.1
[a2af1166] SortingAlgorithms v1.0.1
[276daf66] SpecialFunctions v2.1.7
[82ae8749] StatsAPI v1.5.0
[2913bbd2] StatsBase v0.33.21
[62fd8b95] TensorCore v0.1.1
[3bb67fe8] TranscodingStreams v0.9.9
[5c2747f8] URIs v1.4.0
[1cfade01] UnicodeFun v0.4.1
[41fe7b60] Unzip v0.2.0
[81def892] VersionParsing v1.3.0
[6e34b625] Bzip2_jll v1.0.8+0
[83423d85] Cairo_jll v1.16.1+1
[2e619515] Expat_jll v2.4.8+0
[b22a6f82] FFMPEG_jll v4.4.2+2
[a3f928ae] Fontconfig_jll v2.13.93+0
[d7e528f0] FreeType2_jll v2.10.4+0
[559328eb] FriBidi_jll v1.0.10+0
[0656b61e] GLFW_jll v3.3.8+0
⌅ [d2c73de3] GR_jll v0.69.1+0
[78b55507] Gettext_jll v0.21.0+0
[7746bdde] Glib_jll v2.74.0+1
[3b182d85] Graphite2_jll v1.3.14+0
[2e76f6c2] HarfBuzz_jll v2.8.1+1
[aacddb02] JpegTurbo_jll v2.1.2+0
[c1c5ebd0] LAME_jll v3.100.1+0
[88015f11] LERC_jll v3.0.0+1
[dd4b983a] LZO_jll v2.10.1+0
⌅ [e9f186c6] Libffi_jll v3.2.2+1
[d4300ac3] Libgcrypt_jll v1.8.7+0
[7e76a0d4] Libglvnd_jll v1.3.0+3
[7add5ba3] Libgpg_error_jll v1.42.0+0
[94ce4f54] Libiconv_jll v1.16.1+1
[4b2f31a3] Libmount_jll v2.35.0+0
[925c91fb] Librsvg_jll v2.52.4+0
[89763e89] Libtiff_jll v4.4.0+0
[38a345b3] Libuuid_jll v2.36.0+0
[e7412a2a] Ogg_jll v1.3.5+1
[458c3c95] OpenSSL_jll v1.1.19+0
[efe28fd5] OpenSpecFun_jll v0.5.5+0
[91d4177d] Opus_jll v1.3.2+0
[36c8627f] Pango_jll v1.50.9+0
[30392449] Pixman_jll v0.40.1+0
[ea2cea3b] Qt5Base_jll v5.15.3+2
[a2964d1f] Wayland_jll v1.19.0+0
[2381bf8a] Wayland_protocols_jll v1.25.0+0
[02c8fc9c] XML2_jll v2.9.14+0
[aed1982a] XSLT_jll v1.1.34+0
[4f6342f7] Xorg_libX11_jll v1.6.9+4
[0c0b7dd1] Xorg_libXau_jll v1.0.9+4
[935fb764] Xorg_libXcursor_jll v1.2.0+4
[a3789734] Xorg_libXdmcp_jll v1.1.3+4
[1082639a] Xorg_libXext_jll v1.3.4+4
[d091e8ba] Xorg_libXfixes_jll v5.0.3+4
[a51aa0fd] Xorg_libXi_jll v1.7.10+4
[d1454406] Xorg_libXinerama_jll v1.1.4+4
[ec84b674] Xorg_libXrandr_jll v1.5.2+4
[ea2f1a96] Xorg_libXrender_jll v0.9.10+4
[14d82f49] Xorg_libpthread_stubs_jll v0.1.0+3
[c7cfdc94] Xorg_libxcb_jll v1.13.0+3
[cc61e674] Xorg_libxkbfile_jll v1.1.0+4
[12413925] Xorg_xcb_util_image_jll v0.4.0+1
[2def613f] Xorg_xcb_util_jll v0.4.0+1
[975044d2] Xorg_xcb_util_keysyms_jll v0.4.0+1
[0d47668e] Xorg_xcb_util_renderutil_jll v0.3.9+1
[c22f9ab0] Xorg_xcb_util_wm_jll v0.4.1+1
[35661453] Xorg_xkbcomp_jll v1.4.2+4
[33bec58e] Xorg_xkeyboard_config_jll v2.27.0+4
[c5fb5394] Xorg_xtrans_jll v1.4.0+3
[3161d3a3] Zstd_jll v1.5.2+0
⌅ [214eeab7] fzf_jll v0.29.0+0
[da03df04] gdk_pixbuf_jll v2.42.8+0
[a4ae2306] libaom_jll v3.4.0+0
[0ac62f75] libass_jll v0.15.1+0
[f638f0a6] libfdk_aac_jll v2.0.2+0
[b53b4c65] libpng_jll v1.6.38+0
[f27f6e37] libvorbis_jll v1.3.7+1
[1270edf5] x264_jll v2021.5.5+0
[dfaa095f] x265_jll v3.5.0+0
[d8fb68d0] xkbcommon_jll v1.4.1+0
[0dad84c5] ArgTools v1.1.1
[56f22d72] Artifacts
[2a0f44e3] Base64
[ade2ca70] Dates
[8bb1440f] DelimitedFiles
[f43a241f] Downloads v1.6.0
[7b1f6079] FileWatching
[b77e0a4c] InteractiveUtils
[b27032c2] LibCURL v0.6.3
[76f85450] LibGit2
[8f399da3] Libdl
[37e2e46d] LinearAlgebra
[56ddb016] Logging
[d6f4376e] Markdown
[a63ad114] Mmap
[ca575930] NetworkOptions v1.2.0
[44cfe95a] Pkg v1.8.0
[de0858da] Printf
[9abbd945] Profile
[3fa0cd96] REPL
[9a3f8284] Random
[ea8e919c] SHA v0.7.0
[9e88b42a] Serialization
[6462fe0b] Sockets
[2f01184e] SparseArrays
[10745b16] Statistics
[fa267f1f] TOML v1.0.0
[a4e569a6] Tar v1.10.1
[8dfed614] Test
[cf7118a7] UUIDs
[4ec0a83e] Unicode
[e66e0078] CompilerSupportLibraries_jll v0.5.2+0
[deac9b47] LibCURL_jll v7.84.0+0
[29816b5a] LibSSH2_jll v1.10.2+0
[c8ffd9c3] MbedTLS_jll v2.28.0+0
[14a3606d] MozillaCACerts_jll v2022.2.1
[4536629a] OpenBLAS_jll v0.3.20+0
[05823500] OpenLibm_jll v0.8.1+0
[efcefdf7] PCRE2_jll v10.40.0+0
[83775a58] Zlib_jll v1.2.12+3
[8e850b90] libblastrampoline_jll v5.1.1+0
[8e850ede] nghttp2_jll v1.48.0+0
[3f19e933] p7zip_jll v17.4.0+0
Info Packages marked with ⌃ and ⌅ have new versions available, but those with ⌅ are restricted by compatibility constraints from upgrading. To see why use status --outdated -m

julia> get(ENV, “LD_LIBRARY_PATH”, “not set”)
“not set”

julia> get(ENV, “DYLD_LIBRARY_PATH”, “not set”)
“not set”

julia>

On the Mac, the issue, as you assessed, is that two different QT libraries are being loaded. GR_jll in particular is automatically loaded as of GR 0.68 and Plots 1.34.

One way to address this issue is downgrade Plots to version 1.33.

using Pkg
pkg"add Plots@1.33"

Another option is to use PyPlot.jl or PythonPlot.jl directly.

using Pkg
pkg"add PyPlot"
using PyPlot

Alternatively,

using Pkg
pkg"add PythonPlot"
using PythonPlot

Unfortunately, the interface to PyPlot.jl differs slightly from Plots.jl

By the way, I just tried on my Mac M1 and things seemed to work more smoothly for me. I tried Julia 1.7.3 and Julia 1.8.2:

Diagnostic Output of my Mac Environment using Julia 1.7.3
julia> using InteractiveUtils

julia> versioninfo()
Julia Version 1.7.3
Commit 742b9abb4d (2022-05-06 12:58 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin21.4.0)
  CPU: Apple M1 Max
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, westmere)

julia> using Pkg

julia> pkg"status -m"
      Status `/private/var/folders/5j/phv_vfc97m967ww98fbvtmfr0000gq/T/jl_UHZFZW/Manifest.toml`
  [d1d4a3ce] BitFlags v0.1.6
  [d360d2e6] ChainRulesCore v1.15.6
  [9e997f8a] ChangesOfVariables v0.1.4
  [944b1d66] CodecZlib v0.7.0
  [35d6a980] ColorSchemes v3.19.0
  [3da002f7] ColorTypes v0.11.4
  [c3611d14] ColorVectorSpace v0.9.9
  [5ae59095] Colors v0.12.8
  [34da2185] Compat v4.3.0
  [8f4d0f93] Conda v1.7.0
  [d38c429a] Contour v0.6.2
  [9a962f9c] DataAPI v1.13.0
  [864edb3b] DataStructures v0.18.13
  [ffbed154] DocStringExtensions v0.9.2
  [c87230d0] FFMPEG v0.4.1
  [53c48c17] FixedPointNumbers v0.8.4
  [59287772] Formatting v0.4.2
  [28b8d3ca] GR v0.69.5
  [42e2da0e] Grisu v1.0.2
  [cd3eb016] HTTP v1.5.3
  [83e8ac13] IniFile v0.5.1
  [3587e190] InverseFunctions v0.1.8
  [92d709cd] IrrationalConstants v0.1.1
  [1019f520] JLFzf v0.1.5
  [692b3bcd] JLLWrappers v1.4.1
  [682c06a0] JSON v0.21.3
  [b964fa9f] LaTeXStrings v1.3.0
  [23fbe1c1] Latexify v0.15.17
  [2ab3a3ac] LogExpFunctions v0.3.18
  [e6f89c97] LoggingExtras v0.4.9
  [1914dd2f] MacroTools v0.5.10
  [739be429] MbedTLS v1.1.7
  [442fdcdd] Measures v0.3.1
  [e1d29d7a] Missings v1.0.2
  [77ba4419] NaNMath v1.0.1
  [4d8831e6] OpenSSL v1.3.1
  [bac558e1] OrderedCollections v1.4.1
  [69de0a69] Parsers v2.5.0
  [b98c9c47] Pipe v1.3.0
  [ccf2f8ad] PlotThemes v3.1.0
  [995b91a9] PlotUtils v1.3.1
  [91a5bcdd] Plots v1.36.1
  [21216c6a] Preferences v1.3.0
  [438e738f] PyCall v1.94.1
  [d330b81b] PyPlot v2.11.0
  [3cdcf5f2] RecipesBase v1.3.1
  [01d81517] RecipesPipeline v0.6.10
  [189a3867] Reexport v1.2.2
  [05181044] RelocatableFolders v1.0.0
  [ae029012] Requires v1.3.0
  [6c6a2e73] Scratch v1.1.1
  [992d4aef] Showoff v1.0.3
  [777ac1f9] SimpleBufferStream v1.1.0
  [66db9d55] SnoopPrecompile v1.0.1
  [a2af1166] SortingAlgorithms v1.0.1
  [276daf66] SpecialFunctions v2.1.7
  [82ae8749] StatsAPI v1.5.0
  [2913bbd2] StatsBase v0.33.21
  [62fd8b95] TensorCore v0.1.1
  [3bb67fe8] TranscodingStreams v0.9.9
  [5c2747f8] URIs v1.4.0
  [1cfade01] UnicodeFun v0.4.1
  [41fe7b60] Unzip v0.2.0
  [81def892] VersionParsing v1.3.0
  [6e34b625] Bzip2_jll v1.0.8+0
  [83423d85] Cairo_jll v1.16.1+1
  [2e619515] Expat_jll v2.4.8+0
  [b22a6f82] FFMPEG_jll v4.4.2+2
  [a3f928ae] Fontconfig_jll v2.13.93+0
  [d7e528f0] FreeType2_jll v2.10.4+0
  [559328eb] FriBidi_jll v1.0.10+0
  [0656b61e] GLFW_jll v3.3.8+0
  [d2c73de3] GR_jll v0.69.1+0
  [78b55507] Gettext_jll v0.21.0+0
  [7746bdde] Glib_jll v2.74.0+1
  [3b182d85] Graphite2_jll v1.3.14+0
  [2e76f6c2] HarfBuzz_jll v2.8.1+1
  [aacddb02] JpegTurbo_jll v2.1.2+0
  [c1c5ebd0] LAME_jll v3.100.1+0
  [88015f11] LERC_jll v3.0.0+1
  [dd4b983a] LZO_jll v2.10.1+0
  [e9f186c6] Libffi_jll v3.2.2+1
  [d4300ac3] Libgcrypt_jll v1.8.7+0
  [7e76a0d4] Libglvnd_jll v1.3.0+3
  [7add5ba3] Libgpg_error_jll v1.42.0+0
  [94ce4f54] Libiconv_jll v1.16.1+1
  [4b2f31a3] Libmount_jll v2.35.0+0
  [89763e89] Libtiff_jll v4.4.0+0
  [38a345b3] Libuuid_jll v2.36.0+0
  [e7412a2a] Ogg_jll v1.3.5+1
  [458c3c95] OpenSSL_jll v1.1.19+0
  [efe28fd5] OpenSpecFun_jll v0.5.5+0
  [91d4177d] Opus_jll v1.3.2+0
  [30392449] Pixman_jll v0.40.1+0
  [ea2cea3b] Qt5Base_jll v5.15.3+2
  [a2964d1f] Wayland_jll v1.19.0+0
  [2381bf8a] Wayland_protocols_jll v1.25.0+0
  [02c8fc9c] XML2_jll v2.9.14+0
  [aed1982a] XSLT_jll v1.1.34+0
  [4f6342f7] Xorg_libX11_jll v1.6.9+4
  [0c0b7dd1] Xorg_libXau_jll v1.0.9+4
  [935fb764] Xorg_libXcursor_jll v1.2.0+4
  [a3789734] Xorg_libXdmcp_jll v1.1.3+4
  [1082639a] Xorg_libXext_jll v1.3.4+4
  [d091e8ba] Xorg_libXfixes_jll v5.0.3+4
  [a51aa0fd] Xorg_libXi_jll v1.7.10+4
  [d1454406] Xorg_libXinerama_jll v1.1.4+4
  [ec84b674] Xorg_libXrandr_jll v1.5.2+4
  [ea2f1a96] Xorg_libXrender_jll v0.9.10+4
  [14d82f49] Xorg_libpthread_stubs_jll v0.1.0+3
  [c7cfdc94] Xorg_libxcb_jll v1.13.0+3
  [cc61e674] Xorg_libxkbfile_jll v1.1.0+4
  [12413925] Xorg_xcb_util_image_jll v0.4.0+1
  [2def613f] Xorg_xcb_util_jll v0.4.0+1
  [975044d2] Xorg_xcb_util_keysyms_jll v0.4.0+1
  [0d47668e] Xorg_xcb_util_renderutil_jll v0.3.9+1
  [c22f9ab0] Xorg_xcb_util_wm_jll v0.4.1+1
  [35661453] Xorg_xkbcomp_jll v1.4.2+4
  [33bec58e] Xorg_xkeyboard_config_jll v2.27.0+4
  [c5fb5394] Xorg_xtrans_jll v1.4.0+3
  [3161d3a3] Zstd_jll v1.5.2+0
  [214eeab7] fzf_jll v0.29.0+0
  [a4ae2306] libaom_jll v3.4.0+0
  [0ac62f75] libass_jll v0.15.1+0
  [f638f0a6] libfdk_aac_jll v2.0.2+0
  [b53b4c65] libpng_jll v1.6.38+0
  [f27f6e37] libvorbis_jll v1.3.7+1
  [1270edf5] x264_jll v2021.5.5+0
  [dfaa095f] x265_jll v3.5.0+0
  [d8fb68d0] xkbcommon_jll v1.4.1+0
  [0dad84c5] ArgTools
  [56f22d72] Artifacts
  [2a0f44e3] Base64
  [ade2ca70] Dates
  [8bb1440f] DelimitedFiles
  [f43a241f] Downloads
  [7b1f6079] FileWatching
  [b77e0a4c] InteractiveUtils
  [b27032c2] LibCURL
  [76f85450] LibGit2
  [8f399da3] Libdl
  [37e2e46d] LinearAlgebra
  [56ddb016] Logging
  [d6f4376e] Markdown
  [a63ad114] Mmap
  [ca575930] NetworkOptions
  [44cfe95a] Pkg
  [de0858da] Printf
  [3fa0cd96] REPL
  [9a3f8284] Random
  [ea8e919c] SHA
  [9e88b42a] Serialization
  [6462fe0b] Sockets
  [2f01184e] SparseArrays
  [10745b16] Statistics
  [fa267f1f] TOML
  [a4e569a6] Tar
  [8dfed614] Test
  [cf7118a7] UUIDs
  [4ec0a83e] Unicode
  [e66e0078] CompilerSupportLibraries_jll
  [deac9b47] LibCURL_jll
  [29816b5a] LibSSH2_jll
  [c8ffd9c3] MbedTLS_jll
  [14a3606d] MozillaCACerts_jll
  [4536629a] OpenBLAS_jll
  [05823500] OpenLibm_jll
  [efcefdf7] PCRE2_jll
  [83775a58] Zlib_jll
  [8e850b90] libblastrampoline_jll
  [8e850ede] nghttp2_jll
  [3f19e933] p7zip_jll

julia> get(ENV, "LD_LIBRARY_PATH", "not set")
"not set"

julia> get(ENV, "DYLD_LIBRARY_PATH", "not set")
"not set"
Diagnostic Output of my Mac Environment using Julia 1.8.2
julia> using InteractiveUtils

julia> versioninfo()
Julia Version 1.8.2
Commit 36034abf260 (2022-09-29 15:21 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin21.3.0)
  CPU: 10 × Apple M1 Max
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, apple-m1)
  Threads: 1 on 8 virtual cores

julia> using Pkg

julia> pkg"status -m"
Status `/private/var/folders/5j/phv_vfc97m967ww98fbvtmfr0000gq/T/jl_zmjWS7/Manifest.toml`
  [d1d4a3ce] BitFlags v0.1.6
  [d360d2e6] ChainRulesCore v1.15.6
  [9e997f8a] ChangesOfVariables v0.1.4
  [944b1d66] CodecZlib v0.7.0
  [35d6a980] ColorSchemes v3.19.0
  [3da002f7] ColorTypes v0.11.4
  [c3611d14] ColorVectorSpace v0.9.9
  [5ae59095] Colors v0.12.8
  [34da2185] Compat v4.3.0
  [8f4d0f93] Conda v1.7.0
  [d38c429a] Contour v0.6.2
  [9a962f9c] DataAPI v1.13.0
  [864edb3b] DataStructures v0.18.13
  [ffbed154] DocStringExtensions v0.9.2
  [c87230d0] FFMPEG v0.4.1
  [53c48c17] FixedPointNumbers v0.8.4
  [59287772] Formatting v0.4.2
⌅ [28b8d3ca] GR v0.69.5
  [42e2da0e] Grisu v1.0.2
  [cd3eb016] HTTP v1.5.3
  [83e8ac13] IniFile v0.5.1
  [3587e190] InverseFunctions v0.1.8
  [92d709cd] IrrationalConstants v0.1.1
  [1019f520] JLFzf v0.1.5
  [692b3bcd] JLLWrappers v1.4.1
  [682c06a0] JSON v0.21.3
  [b964fa9f] LaTeXStrings v1.3.0
  [23fbe1c1] Latexify v0.15.17
  [2ab3a3ac] LogExpFunctions v0.3.18
  [e6f89c97] LoggingExtras v0.4.9
  [1914dd2f] MacroTools v0.5.10
  [739be429] MbedTLS v1.1.7
  [442fdcdd] Measures v0.3.1
  [e1d29d7a] Missings v1.0.2
  [77ba4419] NaNMath v1.0.1
  [4d8831e6] OpenSSL v1.3.1
  [bac558e1] OrderedCollections v1.4.1
  [69de0a69] Parsers v2.5.0
  [b98c9c47] Pipe v1.3.0
  [ccf2f8ad] PlotThemes v3.1.0
  [995b91a9] PlotUtils v1.3.1
  [91a5bcdd] Plots v1.36.1
  [21216c6a] Preferences v1.3.0
  [438e738f] PyCall v1.94.1
  [d330b81b] PyPlot v2.11.0
  [3cdcf5f2] RecipesBase v1.3.1
  [01d81517] RecipesPipeline v0.6.10
  [189a3867] Reexport v1.2.2
  [05181044] RelocatableFolders v1.0.0
  [ae029012] Requires v1.3.0
  [6c6a2e73] Scratch v1.1.1
  [992d4aef] Showoff v1.0.3
  [777ac1f9] SimpleBufferStream v1.1.0
  [66db9d55] SnoopPrecompile v1.0.1
  [a2af1166] SortingAlgorithms v1.0.1
  [276daf66] SpecialFunctions v2.1.7
  [82ae8749] StatsAPI v1.5.0
  [2913bbd2] StatsBase v0.33.21
  [62fd8b95] TensorCore v0.1.1
  [3bb67fe8] TranscodingStreams v0.9.9
  [5c2747f8] URIs v1.4.0
  [1cfade01] UnicodeFun v0.4.1
  [41fe7b60] Unzip v0.2.0
  [81def892] VersionParsing v1.3.0
  [6e34b625] Bzip2_jll v1.0.8+0
  [83423d85] Cairo_jll v1.16.1+1
  [2e619515] Expat_jll v2.4.8+0
  [b22a6f82] FFMPEG_jll v4.4.2+2
  [a3f928ae] Fontconfig_jll v2.13.93+0
  [d7e528f0] FreeType2_jll v2.10.4+0
  [559328eb] FriBidi_jll v1.0.10+0
  [0656b61e] GLFW_jll v3.3.8+0
⌅ [d2c73de3] GR_jll v0.69.1+0
  [78b55507] Gettext_jll v0.21.0+0
  [7746bdde] Glib_jll v2.74.0+1
  [3b182d85] Graphite2_jll v1.3.14+0
  [2e76f6c2] HarfBuzz_jll v2.8.1+1
  [aacddb02] JpegTurbo_jll v2.1.2+0
  [c1c5ebd0] LAME_jll v3.100.1+0
  [88015f11] LERC_jll v3.0.0+1
  [dd4b983a] LZO_jll v2.10.1+0
⌅ [e9f186c6] Libffi_jll v3.2.2+1
  [d4300ac3] Libgcrypt_jll v1.8.7+0
  [7e76a0d4] Libglvnd_jll v1.3.0+3
  [7add5ba3] Libgpg_error_jll v1.42.0+0
  [94ce4f54] Libiconv_jll v1.16.1+1
  [4b2f31a3] Libmount_jll v2.35.0+0
  [89763e89] Libtiff_jll v4.4.0+0
  [38a345b3] Libuuid_jll v2.36.0+0
  [e7412a2a] Ogg_jll v1.3.5+1
  [458c3c95] OpenSSL_jll v1.1.19+0
  [efe28fd5] OpenSpecFun_jll v0.5.5+0
  [91d4177d] Opus_jll v1.3.2+0
  [30392449] Pixman_jll v0.40.1+0
  [ea2cea3b] Qt5Base_jll v5.15.3+2
  [a2964d1f] Wayland_jll v1.19.0+0
  [2381bf8a] Wayland_protocols_jll v1.25.0+0
  [02c8fc9c] XML2_jll v2.9.14+0
  [aed1982a] XSLT_jll v1.1.34+0
  [4f6342f7] Xorg_libX11_jll v1.6.9+4
  [0c0b7dd1] Xorg_libXau_jll v1.0.9+4
  [935fb764] Xorg_libXcursor_jll v1.2.0+4
  [a3789734] Xorg_libXdmcp_jll v1.1.3+4
  [1082639a] Xorg_libXext_jll v1.3.4+4
  [d091e8ba] Xorg_libXfixes_jll v5.0.3+4
  [a51aa0fd] Xorg_libXi_jll v1.7.10+4
  [d1454406] Xorg_libXinerama_jll v1.1.4+4
  [ec84b674] Xorg_libXrandr_jll v1.5.2+4
  [ea2f1a96] Xorg_libXrender_jll v0.9.10+4
  [14d82f49] Xorg_libpthread_stubs_jll v0.1.0+3
  [c7cfdc94] Xorg_libxcb_jll v1.13.0+3
  [cc61e674] Xorg_libxkbfile_jll v1.1.0+4
  [12413925] Xorg_xcb_util_image_jll v0.4.0+1
  [2def613f] Xorg_xcb_util_jll v0.4.0+1
  [975044d2] Xorg_xcb_util_keysyms_jll v0.4.0+1
  [0d47668e] Xorg_xcb_util_renderutil_jll v0.3.9+1
  [c22f9ab0] Xorg_xcb_util_wm_jll v0.4.1+1
  [35661453] Xorg_xkbcomp_jll v1.4.2+4
  [33bec58e] Xorg_xkeyboard_config_jll v2.27.0+4
  [c5fb5394] Xorg_xtrans_jll v1.4.0+3
  [3161d3a3] Zstd_jll v1.5.2+0
⌅ [214eeab7] fzf_jll v0.29.0+0
  [a4ae2306] libaom_jll v3.4.0+0
  [0ac62f75] libass_jll v0.15.1+0
  [f638f0a6] libfdk_aac_jll v2.0.2+0
  [b53b4c65] libpng_jll v1.6.38+0
  [f27f6e37] libvorbis_jll v1.3.7+1
  [1270edf5] x264_jll v2021.5.5+0
  [dfaa095f] x265_jll v3.5.0+0
  [d8fb68d0] xkbcommon_jll v1.4.1+0
  [0dad84c5] ArgTools v1.1.1
  [56f22d72] Artifacts
  [2a0f44e3] Base64
  [ade2ca70] Dates
  [8bb1440f] DelimitedFiles
  [f43a241f] Downloads v1.6.0
  [7b1f6079] FileWatching
  [b77e0a4c] InteractiveUtils
  [b27032c2] LibCURL v0.6.3
  [76f85450] LibGit2
  [8f399da3] Libdl
  [37e2e46d] LinearAlgebra
  [56ddb016] Logging
  [d6f4376e] Markdown
  [a63ad114] Mmap
  [ca575930] NetworkOptions v1.2.0
  [44cfe95a] Pkg v1.8.0
  [de0858da] Printf
  [3fa0cd96] REPL
  [9a3f8284] Random
  [ea8e919c] SHA v0.7.0
  [9e88b42a] Serialization
  [6462fe0b] Sockets
  [2f01184e] SparseArrays
  [10745b16] Statistics
  [fa267f1f] TOML v1.0.0
  [a4e569a6] Tar v1.10.1
  [8dfed614] Test
  [cf7118a7] UUIDs
  [4ec0a83e] Unicode
  [e66e0078] CompilerSupportLibraries_jll v0.5.2+0
  [deac9b47] LibCURL_jll v7.84.0+0
  [29816b5a] LibSSH2_jll v1.10.2+0
  [c8ffd9c3] MbedTLS_jll v2.28.0+0
  [14a3606d] MozillaCACerts_jll v2022.2.1
  [4536629a] OpenBLAS_jll v0.3.20+0
  [05823500] OpenLibm_jll v0.8.1+0
  [efcefdf7] PCRE2_jll v10.40.0+0
  [83775a58] Zlib_jll v1.2.12+3
  [8e850b90] libblastrampoline_jll v5.1.1+0
  [8e850ede] nghttp2_jll v1.48.0+0
  [3f19e933] p7zip_jll v17.4.0+0
Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated -m`

julia> get(ENV, "LD_LIBRARY_PATH", "not set")
"not set"

julia> get(ENV, "DYLD_LIBRARY_PATH", "not set")
"not set"
1 Like

One thing I did not check was your Conda environment.

Could you run:

using Pkg
pkg"add Conda"
using Conda
Conda.list()
My Conda Environment for Pyplot
julia> Conda.list()
[ Info: Running `conda list` in root environment
# packages in environment at /Users/kittisopikulm/.julia/conda/3:
#
# Name                    Version                   Build  Channel
brotli                    1.0.9                h1a8c8d9_8    conda-forge
brotli-bin                1.0.9                h1a8c8d9_8    conda-forge
brotlipy                  0.7.0           py310h8e9501a_1005    conda-forge
bzip2                     1.0.8                h3422bc3_4    conda-forge
ca-certificates           2022.9.24            h4653dfc_0    conda-forge
certifi                   2022.9.24          pyhd8ed1ab_0    conda-forge
cffi                      1.15.1          py310h2399d43_2    conda-forge
charset-normalizer        2.1.1              pyhd8ed1ab_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
conda                     22.9.0          py310hbe9552e_2    conda-forge
conda-package-handling    1.9.0           py310h8e9501a_1    conda-forge
contourpy                 1.0.6           py310h2887b22_0    conda-forge
cryptography              38.0.2          py310hfc83b78_2    conda-forge
cycler                    0.11.0             pyhd8ed1ab_0    conda-forge
fonttools                 4.38.0          py310h8e9501a_1    conda-forge
freetype                  2.12.1               hd633e50_0    conda-forge
idna                      3.4                pyhd8ed1ab_0    conda-forge
jpeg                      9e                   he4db4b2_2    conda-forge
kiwisolver                1.4.4           py310h2887b22_1    conda-forge
lcms2                     2.14                 h8193b64_0    conda-forge
lerc                      4.0.0                h9a09cb3_0    conda-forge
libblas                   3.9.0           16_osxarm64_openblas    conda-forge
libbrotlicommon           1.0.9                h1a8c8d9_8    conda-forge
libbrotlidec              1.0.9                h1a8c8d9_8    conda-forge
libbrotlienc              1.0.9                h1a8c8d9_8    conda-forge
libcblas                  3.9.0           16_osxarm64_openblas    conda-forge
libcxx                    14.0.6               h2692d47_0    conda-forge
libdeflate                1.14                 h1a8c8d9_0    conda-forge
libffi                    3.4.2                h3422bc3_5    conda-forge
libgfortran               5.0.0           11_3_0_hd922786_26    conda-forge
libgfortran5              11.3.0              hdaf2cc0_26    conda-forge
liblapack                 3.9.0           16_osxarm64_openblas    conda-forge
libopenblas               0.3.21          openmp_hc731615_3    conda-forge
libpng                    1.6.38               h76d750c_0    conda-forge
libsqlite                 3.39.4               h76d750c_0    conda-forge
libtiff                   4.4.0                hfa0b094_4    conda-forge
libwebp-base              1.2.4                h57fd34a_0    conda-forge
libxcb                    1.13              h9b22ae9_1004    conda-forge
libzlib                   1.2.13               h03a7124_4    conda-forge
llvm-openmp               15.0.4               h7cfbb63_0    conda-forge
matplotlib                3.6.2           py310hb6292c7_0    conda-forge
matplotlib-base           3.6.2           py310h78c5c2f_0    conda-forge
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
ncurses                   6.3                  h07bb92c_1    conda-forge
numpy                     1.23.4          py310h5d7c261_1    conda-forge
openjpeg                  2.5.0                h5d4e404_1    conda-forge
openssl                   3.0.7                h03a7124_0    conda-forge
packaging                 21.3               pyhd8ed1ab_0    conda-forge
pillow                    9.2.0           py310h9337a76_3    conda-forge
pip                       22.3               pyhd8ed1ab_0    conda-forge
pthread-stubs             0.4               h27ca646_1001    conda-forge
pycosat                   0.6.4           py310h8e9501a_1    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pyopenssl                 22.1.0             pyhd8ed1ab_0    conda-forge
pyparsing                 3.0.9              pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1              pyha2e5f31_6    conda-forge
python                    3.10.6          hae75cb6_0_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python_abi                3.10                    2_cp310    conda-forge
readline                  8.1.2                h46ed386_0    conda-forge
requests                  2.28.1             pyhd8ed1ab_1    conda-forge
ruamel_yaml               0.15.80         py310h8e9501a_1008    conda-forge
setuptools                65.5.0             pyhd8ed1ab_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
tk                        8.6.12               he1e0b03_0    conda-forge
toolz                     0.12.0             pyhd8ed1ab_0    conda-forge
tornado                   6.2             py310h8e9501a_1    conda-forge
tqdm                      4.64.1             pyhd8ed1ab_0    conda-forge
tzdata                    2022e                h191b570_0    conda-forge
unicodedata2              15.0.0          py310h8e9501a_0    conda-forge
urllib3                   1.26.11            pyhd8ed1ab_0    conda-forge
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
xorg-libxau               1.0.9                h27ca646_0    conda-forge
xorg-libxdmcp             1.1.3                h27ca646_0    conda-forge
xz                        5.2.6                h57fd34a_0    conda-forge
yaml                      0.2.5                h3422bc3_2    conda-forge
zstd                      1.5.2                h8128057_4    conda-forge

How do you

(Just for info: I have got a conda in my home directory ~/ but also a conda in my julia directory. I cannot remember why I also installed conda under the Julia directory. Also if I use matplotlib directly it would work, e.g.

using PyCall
@pyimport matplotlib.pyplot as plt
@pyimport numpy as np
x = np.linspace(0, 2np.pi, 1000)
y = np.sin(3
x + 4 * np.cos(2*x))
plt.plot(x, y, color=“red”, linewidth=2.0, linestyle=“–”)
plt.title(“The big reset”)
#plt.show()
plt.savefig(“./test.png”)

the invocation of pyplot() lobs a grenade though).

julia> using Pkg

julia> pkg"add Conda"
Updating registry at ~/.julia/registries/General.toml
Resolving package versions…
Updating ~/.julia/environments/v1.8/Project.toml
[8f4d0f93] + Conda v1.7.0
No Changes to ~/.julia/environments/v1.8/Manifest.toml

julia> using Conda

julia> Conda.list()
[ Info: Running conda list in root environment

packages in environment at /Users/jack-reacher/.julia/conda/3:

Name Version Build Channel

blosc 1.21.0 he49afe7_0 conda-forge
boost-cpp 1.74.0 hff03dee_4 conda-forge
brotli 1.0.9 h0d85af4_6 conda-forge
brotli-bin 1.0.9 h0d85af4_6 conda-forge
brotlipy 0.7.0 py39h89e85a6_1003 conda-forge
bzip2 1.0.8 h0d85af4_4 conda-forge
c-ares 1.18.1 h0d85af4_0 conda-forge
ca-certificates 2022.9.24 h033912b_0 conda-forge
cairo 1.16.0 he43a7df_1008 conda-forge
certifi 2022.9.24 pyhd8ed1ab_0 conda-forge
cffi 1.15.0 py39he338e87_0 conda-forge
cfitsio 4.0.0 hb20e66c_0 conda-forge
charset-normalizer 2.0.9 pyhd8ed1ab_0 conda-forge
colorama 0.4.4 pyh9f0ad1d_0 conda-forge
conda 22.9.0 py39h6e9494a_2 conda-forge
conda-package-handling 1.7.3 py39h89e85a6_1 conda-forge
cryptography 36.0.0 py39h209aa08_0 conda-forge
curl 7.81.0 hf45b732_0 conda-forge
cycler 0.11.0 pyhd8ed1ab_0 conda-forge
dbus 1.13.6 h811a1a6_3 conda-forge
dcw-gmt 2.0.2 h694c41f_0 conda-forge
expat 2.4.2 he49afe7_0 conda-forge
fftw 3.3.10 nompi_hf082fe4_102 conda-forge
font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge
font-ttf-inconsolata 3.000 h77eed37_0 conda-forge
font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge
font-ttf-ubuntu 0.83 hab24e00_0 conda-forge
fontconfig 2.13.1 h10f422b_1005 conda-forge
fonts-conda-ecosystem 1 0 conda-forge
fonts-conda-forge 1 0 conda-forge
fonttools 4.28.5 py39h89e85a6_0 conda-forge
freetype 2.10.4 h4cff582_1 conda-forge
freexl 1.0.6 h0d85af4_0 conda-forge
gdal 3.4.0 py39h9e6e899_11 conda-forge
geos 3.10.1 he49afe7_1 conda-forge
geotiff 1.7.0 h9e3163f_5 conda-forge
gettext 0.19.8.1 hd1a6beb_1008 conda-forge
ghostscript 9.54.0 he49afe7_1 conda-forge
giflib 5.2.1 hbcb3906_2 conda-forge
gmt 6.3.0 h355c565_2 conda-forge
gshhg-gmt 2.3.7 h694c41f_1003 conda-forge
hdf4 4.2.15 hefd3b78_3 conda-forge
hdf5 1.12.1 nompi_h2f0ef1a_103 conda-forge
icu 68.2 he49afe7_0 conda-forge
idna 3.1 pyhd3deb0d_0 conda-forge
jbig 2.1 h0d85af4_2003 conda-forge
jpeg 9d hbcb3906_0 conda-forge
json-c 0.15 hcb556a6_0 conda-forge
kealib 1.4.14 ha22a8b1_3 conda-forge
kiwisolver 1.3.2 py39hf018cea_1 conda-forge
krb5 1.19.2 hcfbf3a7_3 conda-forge
lcms2 2.12 h577c468_0 conda-forge
lerc 3.0 he49afe7_0 conda-forge
libblas 3.9.0 12_osx64_openblas conda-forge
libbrotlicommon 1.0.9 h0d85af4_6 conda-forge
libbrotlidec 1.0.9 h0d85af4_6 conda-forge
libbrotlienc 1.0.9 h0d85af4_6 conda-forge
libcblas 3.9.0 12_osx64_openblas conda-forge
libclang 11.1.0 default_he082bbe_1 conda-forge
libcurl 7.81.0 hf45b732_0 conda-forge
libcxx 12.0.1 habf9029_1 conda-forge
libdap4 3.20.6 h3e144a0_2 conda-forge
libdeflate 1.8 h0d85af4_0 conda-forge
libedit 3.1.20191231 h0678c8f_2 conda-forge
libev 4.33 haf1e3a3_1 conda-forge
libffi 3.4.2 h0d85af4_5 conda-forge
libgdal 3.4.0 h97a9cf0_11 conda-forge
libgfortran 5.0.0 9_3_0_h6c81a4c_23 conda-forge
libgfortran5 9.3.0 h6c81a4c_23 conda-forge
libglib 2.70.2 hf1fb8c0_1 conda-forge
libiconv 1.16 haf1e3a3_0 conda-forge
libkml 1.3.0 h8fd9edb_1014 conda-forge
liblapack 3.9.0 12_osx64_openblas conda-forge
libllvm11 11.1.0 hd011deb_2 conda-forge
libnetcdf 4.8.1 nompi_h6609ca0_101 conda-forge
libnghttp2 1.43.0 h6f36284_1 conda-forge
libopenblas 0.3.18 openmp_h3351f45_0 conda-forge
libpng 1.6.37 h7cec526_2 conda-forge
libpq 13.5 hea3049e_1 conda-forge
librttopo 1.1.0 h0d74fd6_8 conda-forge
libspatialite 5.0.1 h24415ee_12 conda-forge
libssh2 1.10.0 h52ee1ee_2 conda-forge
libtiff 4.3.0 hd146c10_2 conda-forge
libwebp-base 1.2.1 h0d85af4_0 conda-forge
libxml2 2.9.12 h93ec3fd_0 conda-forge
libzip 1.8.0 h8b0c345_1 conda-forge
libzlib 1.2.11 h9173be1_1013 conda-forge
llvm-openmp 12.0.1 hda6cdc1_1 conda-forge
lz4-c 1.9.3 he49afe7_1 conda-forge
matplotlib 3.5.1 py39h6e9494a_0 conda-forge
matplotlib-base 3.5.1 py39hb07454d_0 conda-forge
munkres 1.1.4 pyh9f0ad1d_0 conda-forge
mysql-common 8.0.27 h694c41f_3 conda-forge
mysql-libs 8.0.27 h115446f_3 conda-forge
ncurses 6.2 h2e338ed_4 conda-forge
nspr 4.32 hcd9eead_1 conda-forge
nss 3.73 h31e2bf1_0 conda-forge
numpy 1.22.3 py39h214027c_2 conda-forge
olefile 0.46 pyh9f0ad1d_1 conda-forge
openjpeg 2.4.0 h6e7aa92_1 conda-forge
openssl 1.1.1s hfd90126_0 conda-forge
packaging 21.3 pyhd8ed1ab_0 conda-forge
pcre 8.45 he49afe7_0 conda-forge
pillow 8.4.0 py39he9bb72f_0 conda-forge
pip 21.3.1 pyhd8ed1ab_0 conda-forge
pixman 0.40.0 hbcb3906_0 conda-forge
poppler 21.11.0 h9573804_0 conda-forge
poppler-data 0.4.11 hd8ed1ab_0 conda-forge
postgresql 13.5 he8fe76e_1 conda-forge
proj 8.2.0 h1512c50_0 conda-forge
pycosat 0.6.3 py39h89e85a6_1009 conda-forge
pycparser 2.21 pyhd8ed1ab_0 conda-forge
pyopenssl 21.0.0 pyhd8ed1ab_0 conda-forge
pyparsing 3.0.6 pyhd8ed1ab_0 conda-forge
pyqt 5.12.3 py39h6e9494a_8 conda-forge
pyqt-impl 5.12.3 py39he44290a_8 conda-forge
pyqt5-sip 4.19.18 py39h15fb055_8 conda-forge
pyqtchart 5.12 py39he44290a_8 conda-forge
pyqtwebengine 5.12.1 py39he44290a_8 conda-forge
pysocks 1.7.1 py39h6e9494a_4 conda-forge
python 3.9.7 h1248fe1_3_cpython conda-forge
python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge
python_abi 3.9 2_cp39 conda-forge
qt 5.12.9 h126340a_4 conda-forge
readline 8.1 h05e3726_0 conda-forge
requests 2.26.0 pyhd8ed1ab_1 conda-forge
ruamel_yaml 0.15.80 py39h89e85a6_1006 conda-forge
setuptools 59.4.0 py39h6e9494a_0 conda-forge
six 1.16.0 pyh6c4a22f_0 conda-forge
sqlite 3.37.0 h23a322b_0 conda-forge
tiledb 2.5.3 hca4410a_0 conda-forge
tk 8.6.11 h5dbffcc_1 conda-forge
toolz 0.12.0 pyhd8ed1ab_0 conda-forge
tornado 6.1 py39h89e85a6_2 conda-forge
tqdm 4.62.3 pyhd8ed1ab_0 conda-forge
tzcode 2021e h0d85af4_0 conda-forge
tzdata 2021e he74cb21_0 conda-forge
urllib3 1.26.7 pyhd8ed1ab_0 conda-forge
wheel 0.37.0 pyhd8ed1ab_1 conda-forge
xerces-c 3.2.3 h379762d_3 conda-forge
xz 5.2.5 haf1e3a3_1 conda-forge
yaml 0.2.5 haf1e3a3_0 conda-forge
zlib 1.2.11 h9173be1_1013 conda-forge
zstd 1.5.1 h582d3a0_0 conda-forge

One obvious difference in the conda environment is that I do not have pyqt installed at all.

The .julia/conda environment is installed by default by PyCall.jl and Conda.jl.

You can configure PyCall to use another Conda environment:

ENV["PYTHON"] = "/path/to/python_in_conda_environment"
using Pkg
Pkg.build("PyCall")

See GitHub - JuliaPy/PyCall.jl: Package to call Python functions from the Julia language

How do I?

I actually like that you can install packages on the fly from within a Julia session in a bash terminal as you go along (I do not use Jupyter; never have; never will; also true for Python; it is Emacs+terminal). I really like that and find it pretty cool.

But plotting is just broken. I know it is not Julia’s fault but it is simply broken.

It should not take me days or months to install a working plotting library.

If I do what you said needs doing:

julia> ENV[“PYTHON”] = “/opt/anaconda3/bin/python3.8”

“/opt/anaconda3/bin/python3.8”

julia> using Pkg

julia> Pkg.build(“PyCall”)

Building Conda ─→ ~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/6e47d11ea2776bc5627421d59cdcc1296c058071/build.log

Building PyCall → ~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/53b8b07b721b77144a0fbbbc2675222ebf40a02d/build.log

Precompiling project…

2 dependencies successfully precompiled in 8 seconds. 148 already precompiled.

julia> using Plots

julia> pyplot()

Intel MKL FATAL ERROR: Cannot load libmkl_intel_thread.1.dylib.

Installing Plots with GR worked with a new install and a clean environment that I did to evaluate what may be happening in your case in the past 24 hours. Both worked seamlessly for me on Ubuntu 22.04 and macOS so it is hard to say what is broken without further information from you about your system.

I recently helped to fix a Plots/GR install in two other instances in 24 hours. Here is one on Discourse:

It is not clear me to if you tried using GR on your Mac. The other thing we have not tried yet is using the upstream binaries from https://gr-framework.org/ . In contrast to the Julia packaging approach which tried to be self-contained, those binary packages are linked against specific system binaries:
C library GR — GR Framework 0.72.10 documentation

After untaring the tarball, you can try

using GR # repeat this until it loads
GR.GRPreferences.use_system_binary("/path/to/gr"; force = true)

One thing I am working thriugh at the moment is decreasing GR.jl’s dependence on environment variables. It could be that your PATH environment variable is setup that it tries load some outside library unknown to us before it can load the binaries that we provide.

What is the output of ENV["PATH"] before and after you load Plots?

Currently you are trying to combine Julia with an Anaconda install linked to the Intel MKL library. This is proprietary software so it is difficult for us to support here. We do have a way to use the MKL in Julia, but the effort is likely overkill if all you would like to do is plot.

If you want to try a conda based solution, I have some involvement with conda-forge so it would be easier to support a conda environment exclusively using that conda-forge channel. Heck you could even install Julia via conda-forge on macOS at the moment. My recommendation these days is to use mambaforge rather than Anaconda these days.

From there you could setup an environment using

mamba install -c conda-forge -n python_julia numpy pyjulia julia
mamba activate python_julia

Swapping conda for mamba should work as well, but mamba is a lot faster in my experience.

We’re superficially surveying a bunch of different approaches. It might be better to choose the on me that is furthest along and drill into it.

1 Like

Thanks for your effort helping here.

But this is not a solution.

I want pyplot().

Could be wrong though but your GR is the GR backend and not pyplot?

Or is poyplot() included in your GR package?

By the way I am not trying to use anaconda from my home directory with Julia. You said I should give it a go and to link to the system wide anaconda and not the one that sits under the Julia directory.

GR as far as I understand works on my Ventura (you said to me GR is the default backend if nothing else gets in the way). I can do:

using Plots
plot(rand(23))

Anaconda, Intel MKL

If you really want to use the Anaconda base environment, which is unusual to use directly, you can try first switching Julia to a MKL linear algebra backend.

I highly recommend creating a conda environment for this purpose.

Next we may then need to try to override the Julia binary artifact with the system artifact:
https://pkgdocs.julialang.org/v1/artifacts/#Overriding-artifact-locations

Since this a proprietary, I recommend requesting support from the proprietary vendor, Anaconda Inc for details:

PythonCall

Have you tried to install PythonPlot.jl as I recommended above? It’s not clear to me if you tried this or the original PyPlots.jl package.

That uses GitHub - JuliaPy/PythonCall.jl: Python and Julia in harmony. which is a separate Python interface from PyCall.jl:

https://cjdoris.github.io/PythonCall.jl/stable/

Do you really need Plots.jl to work with the pyplots() backend or could PythonPlot.jl work by itself? This would simpify the situation.

I never said I want to use anaconda base environment. If you mean by anaconda base the system wide anaconda in my home directory. You said to me I could try to use the system wide anaconda.

PyPlot may work:

using PyPlot

julia> x = range(0; stop=2*pi, length=1000)
Julia> y = sin.(3 * x + 4 * cos.(2 * x))

julia> plot(x, y, color=“red”, linewidth=2.0, linestyle=“–”)

qt.qpa.drawing: Layer-backing can not be explicitly controlled on 10.14 when built against the 10.14 SDK

1-element Vector{PyCall.PyObject}:

PyObject <matplotlib.lines.Line2D object at 0x18cea5d00>

Edit: It is probably a better idea to use PyPlot directly and not via using Plots. Personally I think it is just crazy to have so many plotting packages in container Plots which cause more problems than they solve. Not clear to me why plotting packages are not dealt with individually. A lot easier to follow for everyone.

No. I never mentioned “anaconda”. I only referred to “conda”, the open source source package manager. I do not touch Anaconda, the commercial distribution, these days because I usually cannot fix it even if I know how. There are too many proprietary components, and I don’t have a clear way of contributing to Anaconda even if I wanted that. If you’re using /opt/anaconda3/bin/python3.8 then you are using a proprietary build that is problematic for me to engage with due to licensing and the terms of service. There are people paid to support that product, so I steer clear. If you want to work with a proprietary product, seek proprietary, not community support.

If you start python and it says something like Python 3.10.5 | packaged by conda-forge then that works for me. For me, that is usually located at an address such as <root_env>/mambaforge/envs/py310/bin/python.

I mostly agree with you. As you see we provide many options. No one is making you use Plots.jl nor recommending it is the best solution for all cases. It’s objective is to provide a unified meta-interface over many backends. If that’s not what you want, then you probably should just one of the plotting packages directly.

You can use PyPlot.jl, PythonPlot.jl, Makie.jl, Gadfly.jl, Gaston.jl, Gnuplot.jl, UnicodePlots.jl, Plotly.jl, PlotlyJS.jl, GR.jl, or Dash.jl, etc. Some of these even have swappable backends themselves.

Regarding PyPlot.jl and PythonPlot.jl, I might lean towards PythonPlot.jl for a new project. The underlying PythonCall.jl / juliacall foundation is relatively stronger than than the older PyCall.jl / pyjulia foundation. I’ve started to work on pyjulia, but there is a lot of catching up to do.

1 Like

Hi Mark

I need to emphasise it again: I do not use /opt/anaconda3/bin/python3.8 in Julia.

I cannot remember if you said I should try to link it to my system wide conda or you just meant system wide Python install on in order to rule out that the Julia local Python is not at fault.

In any case the Julia Python is:

/Users/angel/.julia/conda/3/bin/python3.9

Personally I think this is the best solution for Julia. To separate the system wide Python from the Python Julia understands. This is what anaconda does with virtual environments: it installs a Python copy and other Python packages into that virtual environment to keep it clean from system wide Python versions and interdependencies. This is probably the reason why for most parts anaconda and virtual environments just work.

But it is still not clear why on my Ventura macOS using Plots; pyplot() wouldn’t work. But using PyPlots directly in Julia will work.

I have wondered if I should completely move away from pyplot in python and do the plotting outside of python with gnuplot. Python would just produce the input files to gnuplot. Having those plotting functionality in a programming language like Python leads to awful terrible messy bad code. I always end up doing loads of data analysis inside my plotting routines which is just not good practise.

There are two different interfaces to GNUPlot:

I’m not sure what is going on with PyPlot on your Mac. If you want to start fresh, you can try these steps:

  1. Move .julia/conda to a backup location
  2. Remove the file at Pkg.dir("PyCall","deps","PYTHON")
  3. Set the environment variable PYTHON to "".
  4. Do a Pkg.build() or Pkg.build("PyCall").

These instructions are derived from GitHub - JuliaPy/PyCall.jl: Package to call Python functions from the Julia language

If you want to use PythonPlot.jl / PythonCall.jl see this documentation:
https://cjdoris.github.io/PythonCall.jl/stable/

Also, I mentioned one specific issue previously. Plots.jl loads GR.jl by default even if you are using the pyplot() backend. GR.jl loads GR_jll.jl which in turns loads QT libraries.

matplotlib is likely also loading QT libraries, and it is quite possible that the QT libraries loaded by GR_jll are not the same ones loaded by matplotlib.

Prior to GR 0.68, I had made a change such that GR_jll is loaded lazily. However to accelerating precompilation of Plots.jl it was changed such that GR_jll was loaded eagerly, meaning you did not have a chance to not loading GR_jll at all.

As of Julia 1.6, we now have a better way of doing this via compile-time preferences via Preferences.jl. I’ve filed an issue on this yesterday:

Essentially, via a compile-time preference you could change the default backend. This would allow you to configure a situation in which GR_jll is never loaded at all and thus the QT libraries that it loads have no chance of interfering with the QT libraries that matplotlib loads.