<div dir="ltr">Hello everybody,<div>I was experiencing issues installing a QGIS Python plugin on MacOS 12.6 and, after some investigation, I found out that the problem seems to happen only with the current QGIS-LTR (3.22) and not with the latest release (3.28.2-Firenze).</div><div>The problem occurs for instance when attempting to do something like the following from the QGIS Python console:</div><div>from matplotlib import pyplot</div><div><br></div><div>Traceback (most recent call last):<br></div><div>  File "/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/code.py", line 90, in runcode<br>    exec(code, self.locals)<br>  File "<input>", line 1, in <module><br>  File "/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import<br>    mod = _builtin_import(name, globals, locals, fromlist, level)<br>  File "/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/matplotlib-3.3.0-py3.8-macosx-10.13.0-x86_64.egg/matplotlib/pyplot.py", line 36, in <module><br>    import matplotlib.colorbar<br>  File "/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import<br>    mod = _builtin_import(name, globals, locals, fromlist, level)<br>  File "/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/matplotlib-3.3.0-py3.8-macosx-10.13.0-x86_64.egg/matplotlib/colorbar.py", line 44, in <module><br>    import matplotlib.contour as contour<br>  File "/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import<br>    mod = _builtin_import(name, globals, locals, fromlist, level)<br>  File "/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/matplotlib-3.3.0-py3.8-macosx-10.13.0-x86_64.egg/matplotlib/contour.py", line 17, in <module><br>    import matplotlib.text as text<br>  File "/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import<br>    mod = _builtin_import(name, globals, locals, fromlist, level)<br>  File "/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/matplotlib-3.3.0-py3.8-macosx-10.13.0-x86_64.egg/matplotlib/text.py", line 16, in <module><br>    from .textpath import TextPath  # Unused, but imported by others.<br>  File "/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import<br>    mod = _builtin_import(name, globals, locals, fromlist, level)<br>  File "/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/matplotlib-3.3.0-py3.8-macosx-10.13.0-x86_64.egg/matplotlib/textpath.py", line 11, in <module><br>    from matplotlib.mathtext import MathTextParser<br>  File "/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import<br>    mod = _builtin_import(name, globals, locals, fromlist, level)<br>  File "/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/matplotlib-3.3.0-py3.8-macosx-10.13.0-x86_64.egg/matplotlib/mathtext.py", line 27, in <module><br>    from PIL import Image<br>  File "/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import<br>    mod = _builtin_import(name, globals, locals, fromlist, level)<br>  File "/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/Pillow-7.2.0-py3.8-macosx-10.13.0-x86_64.egg/PIL/Image.py", line 94, in <module><br>    from . import _imaging as core<br>  File "/Applications/QGIS-LTR.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import<br>    mod = _builtin_import(name, globals, locals, fromlist, level)<br>ImportError: dlopen(/Applications/QGIS-LTR.app/Contents/MacOS/lib/python3.8/site-packages/Pillow-7.2.0-py3.8-macosx-10.13.0-x86_64.egg/PIL/_<a href="http://imaging.cpython-38-darwin.so">imaging.cpython-38-darwin.so</a>, 0x0002): Library not loaded: '/opt/X11/lib/libxcb.1.dylib'<br>  Referenced from: '/Applications/QGIS-LTR.app/Contents/Resources/python/site-packages/pillow-7.2.0-py3.8-macosx-10.13.0-x86_64.egg/PIL/_<a href="http://imaging.cpython-38-darwin.so">imaging.cpython-38-darwin.so</a>'<br>  Reason: tried: '/opt/X11/lib/libxcb.1.dylib' (no such file), '/usr/local/lib/libxcb.1.dylib' (no such file), '/usr/lib/libxcb.1.dylib' (no such file)<br clear="all"><div><br></div><div>Cheers,</div><div>Paolo</div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><br>

<span><strong>PAOLO TORMENE</strong> </span>
<span> senior software developer </span>
 +39 0382 5169882  
<br>
<div> </div>

<strong>GLOBAL EARTHQUAKE MODEL </strong> 
working together to assess risk
<br>
<div> </div>

<span><strong>GEM -</strong>
<a href="http://www.globalquakemodel.org" target="_blank">globalquakemodel.org</a> </span>

<span><strong>T -</strong>
<a href="http://twitter.com/GEMwrld" target="_blank">@GEMwrld</a> </span>

<strong>F -</strong>
<a href="http://www.facebook.com/GEMwrld" target="_blank">GEMwrld</a> <br></div></div></div></div>