A while a go I made a small test with GTK and Matplotlib in VSCode. Using:

from matplotlib.backends.backend_gtk4agg import (
    FigureCanvasGTK4Agg as FigureCanvas)
from matplotlib.figure import Figure

It ran fine. Now I tried to run it again after upgrading from Fedora 35 to Fedora 36 and I get the following error.

File "/home/[user]/.../gtk_matplotlib/", line 1, in <module>
    import gi
  File "/home/[user]/.../gtk_matplotlib/venv/lib64/python3.10/site-packages/gi/", line 40, in <module>
    from . import _gi
ImportError: cannot open shared object file: No such file or directory

It looks like libffi is installed

$dnf list installed "libffi*"
Installed Packages
libffi.i686                             3.4.2-8.fc36                     @fedora
libffi.x86_64                           3.4.2-8.fc36                     @fedora
libffi-devel.x86_64                     3.4.2-8.fc36                     @fedora

I removed and created a new venvbut it didn’t help. Is there anything else I can try?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.