Hi, thanks for your suggestions. I have successfully injected:
pcbnew_pyshell_one_step << "import sys\n";
pcbnew_pyshell_one_step << "print(sys.path)\n";
pcbnew_pyshell_one_step << "import kicad_pyshell\n";
pcbnew_pyshell_one_step << "import wx\n";
In KiCad:
['/home/miceuz/kicad/bin',
'/home/miceuz/kicad/usr/share/kicad/scripting',
'/home/miceuz/kicad/lib/python3/dist-packages',
'/usr/lib/python38.zip',
'/usr/lib/python3.8',
'/usr/lib/python3.8/lib-dynload',
'/home/miceuz/.local/lib/python3.8/site-packages',
'/usr/local/lib/python3.8/dist-packages',
'/usr/lib/python3/dist-packages',
'/usr/lib/python3.8/dist-packages',
'.',
'/home/miceuz/kicad/share/kicad/scripting',
'/home/miceuz/kicad/share/kicad/scripting/plugins',
'/home/miceuz/.config/kicad/5.99/scripting',
'/home/miceuz/.config/kicad/5.99/scripting/plugins']
In python3:
['',
'/usr/lib/python38.zip',
'/usr/lib/python3.8',
'/usr/lib/python3.8/lib-dynload',
'/home/miceuz/.local/lib/python3.8/site-packages',
'/usr/local/lib/python3.8/dist-packages',
'/usr/lib/python3/dist-packages',
'/usr/lib/python3.8/dist-packages']
Unfortunately I don’t see anything out of ordinary - none of paths that are in KiCad contain any wx directories or files except for /usr/local/lib/python3.8/dist-packages
where wxWidgets was installed by pip
I have tried one experiment:
~/kicad/bin $ python3
Python 3.8.5 (default, Jul 28 2020, 12:59:40)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path=['/home/miceuz/kicad/bin',
... '/home/miceuz/kicad/usr/share/kicad/scripting',
... '/home/miceuz/kicad/lib/python3/dist-packages',
... '/usr/lib/python38.zip',
... '/usr/lib/python3.8',
... '/usr/lib/python3.8/lib-dynload',
... '/home/miceuz/.local/lib/python3.8/site-packages',
... '/usr/local/lib/python3.8/dist-packages',
... '/usr/lib/python3/dist-packages',
... '/usr/lib/python3.8/dist-packages',
... '.',
... '/home/miceuz/kicad/share/kicad/scripting',
... '/home/miceuz/kicad/share/kicad/scripting/plugins',
... '/home/miceuz/.config/kicad/5.99/scripting',
... '/home/miceuz/.config/kicad/5.99/scripting/plugins']
>>> import kicad_pyshell
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/miceuz/kicad/share/kicad/scripting/kicad_pyshell/__init__.py", line 24, in <module>
import pcbnew
File "/home/miceuz/kicad/lib/python3/dist-packages/pcbnew.py", line 15, in <module>
import _pcbnew
ImportError: /home/miceuz/kicad/lib/python3/dist-packages/_pcbnew.so: undefined symbol: _ZN14wxPlatformInfo14GetBitnessNameE9wxBitness, version WXU_3.1
>>>
Am I correct to interpret this that _pcbnew.so
does not know anything about WXU_3.1
symbols anyway?
This is ldd output:
ldd /home/miceuz/kicad/lib/python3/dist-packages/_pcbnew.so
linux-vdso.so.1 (0x00007ffc22be0000)
libwx_gtk3u_gl-3.1.so.5 => /home/miceuz/Downloads/wxWidgets/buildgtk/lib/libwx_gtk3u_gl-3.1.so.5 (0x00007fafdfc93000)
libwx_gtk3u_aui-3.1.so.5 => /home/miceuz/Downloads/wxWidgets/buildgtk/lib/libwx_gtk3u_aui-3.1.so.5 (0x00007fafdfbe3000)
libwx_gtk3u_html-3.1.so.5 => /home/miceuz/Downloads/wxWidgets/buildgtk/lib/libwx_gtk3u_html-3.1.so.5 (0x00007fafdfb00000)
libwx_gtk3u_core-3.1.so.5 => /home/miceuz/Downloads/wxWidgets/buildgtk/lib/libwx_gtk3u_core-3.1.so.5 (0x00007fafdf22d000)
libwx_baseu_net-3.1.so.5 => /home/miceuz/Downloads/wxWidgets/buildgtk/lib/libwx_baseu_net-3.1.so.5 (0x00007fafdf1c8000)
libwx_baseu-3.1.so.5 => /home/miceuz/Downloads/wxWidgets/buildgtk/lib/libwx_baseu-3.1.so.5 (0x00007fafdeeff000)
libwx_gtk3u_propgrid-3.1.so.5 => /home/miceuz/Downloads/wxWidgets/buildgtk/lib/libwx_gtk3u_propgrid-3.1.so.5 (0x00007fafdedea000)
libwx_baseu_xml-3.1.so.5 => /home/miceuz/Downloads/wxWidgets/buildgtk/lib/libwx_baseu_xml-3.1.so.5 (0x00007fafdedd6000)
libwx_gtk3u_stc-3.1.so.5 => /home/miceuz/Downloads/wxWidgets/buildgtk/lib/libwx_gtk3u_stc-3.1.so.5 (0x00007fafdeb13000)
libpython3.8.so.1.0 => /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0 (0x00007fafde57d000)
libkicad_3dsg.so.2.0.0 => /home/miceuz/Xaltura/kicad/build/release/3d-viewer/3d_cache/sg/libkicad_3dsg.so.2.0.0 (0x00007fafde50e000)
libgtk-3.so.0 => /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 (0x00007fafddd5b000)
libcairo.so.2 => /usr/lib/x86_64-linux-gnu/libcairo.so.2 (0x00007fafddc38000)
libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007fafddbd8000)
libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fafddaaf000)
libcurl.so.4 => /usr/lib/x86_64-linux-gnu/libcurl.so.4 (0x00007fafdda1e000)
libEGL.so.1 => /usr/lib/x86_64-linux-gnu/libEGL.so.1 (0x00007fafdda09000)
libpixman-1.so.0 => /usr/lib/x86_64-linux-gnu/libpixman-1.so.0 (0x00007fafdd960000)
libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007fafdd8d8000)
libGLU.so.1 => /usr/lib/x86_64-linux-gnu/libGLU.so.1 (0x00007fafdd866000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fafdd685000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fafdd536000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fafdd51b000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fafdd4f6000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fafdd304000)
/lib64/ld-linux-x86-64.so.2 (0x00007fafe1eb0000)
libgdk-3.so.0 => /usr/lib/x86_64-linux-gnu/libgdk-3.so.0 (0x00007fafdd1ff000)
libwayland-egl.so.1 => /usr/lib/x86_64-linux-gnu/libwayland-egl.so.1 (0x00007fafdd1fa000)
libwayland-client.so.0 => /usr/lib/x86_64-linux-gnu/libwayland-client.so.0 (0x00007fafdd1e9000)
libpangocairo-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 (0x00007fafdd1d5000)
libpango-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0 (0x00007fafdd186000)
libgdk_pixbuf-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 (0x00007fafdd15e000)
libgio-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0 (0x00007fafdcf7d000)
libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007fafdce40000)
libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007fafdce39000)
libSM.so.6 => /usr/lib/x86_64-linux-gnu/libSM.so.6 (0x00007fafdce2c000)
libXtst.so.6 => /usr/lib/x86_64-linux-gnu/libXtst.so.6 (0x00007fafdcc26000)
libpangoft2-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 (0x00007fafdcc0d000)
libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007fafdcbc6000)
libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007fafdcb8e000)
libjpeg.so.8 => /usr/lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007fafdcb09000)
libtiff.so.5 => /usr/lib/x86_64-linux-gnu/libtiff.so.5 (0x00007fafdca86000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fafdca6a000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fafdca64000)
libsecret-1.so.0 => /usr/lib/x86_64-linux-gnu/libsecret-1.so.0 (0x00007fafdca03000)
liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fafdc9da000)
libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007fafdc9aa000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007fafdc9a5000)
libgmodule-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007fafdc99f000)
libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007fafdc98d000)
libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007fafdc985000)
libcairo-gobject.so.2 => /usr/lib/x86_64-linux-gnu/libcairo-gobject.so.2 (0x00007fafdc977000)
libatk-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libatk-1.0.so.0 (0x00007fafdc94d000)
libatk-bridge-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0 (0x00007fafdc916000)
libepoxy.so.0 => /usr/lib/x86_64-linux-gnu/libepoxy.so.0 (0x00007fafdc7e3000)
libfribidi.so.0 => /usr/lib/x86_64-linux-gnu/libfribidi.so.0 (0x00007fafdc7c6000)
libharfbuzz.so.0 => /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007fafdc6c1000)
libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007fafdc600000)
libxcb-shm.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007fafdc5fb000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fafdc5d1000)
libxcb-render.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007fafdc5c2000)
libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007fafdc3b8000)
libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007fafdc3a3000)
libffi.so.7 => /usr/lib/x86_64-linux-gnu/libffi.so.7 (0x00007fafdc395000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fafdc322000)
libnghttp2.so.14 => /usr/lib/x86_64-linux-gnu/libnghttp2.so.14 (0x00007fafdc2f9000)
libidn2.so.0 => /usr/lib/x86_64-linux-gnu/libidn2.so.0 (0x00007fafdc2d8000)
librtmp.so.1 => /usr/lib/x86_64-linux-gnu/librtmp.so.1 (0x00007fafdc2b8000)
libssh.so.4 => /usr/lib/x86_64-linux-gnu/libssh.so.4 (0x00007fafdc248000)
libpsl.so.5 => /usr/lib/x86_64-linux-gnu/libpsl.so.5 (0x00007fafdc235000)
libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007fafdc1a2000)
libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007fafdbecc000)
libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007fafdbe7f000)
libldap_r-2.4.so.2 => /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2 (0x00007fafdbe29000)
liblber-2.4.so.2 => /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2 (0x00007fafdbe18000)
libbrotlidec.so.1 => /usr/lib/x86_64-linux-gnu/libbrotlidec.so.1 (0x00007fafdbe08000)
libGLdispatch.so.0 => /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007fafdbd50000)
libGLX.so.0 => /usr/lib/x86_64-linux-gnu/libGLX.so.0 (0x00007fafdbd1c000)
libXinerama.so.1 => /usr/lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007fafdbd17000)
libXrandr.so.2 => /usr/lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007fafdbd0a000)
libXcursor.so.1 => /usr/lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007fafdbcfb000)
libXcomposite.so.1 => /usr/lib/x86_64-linux-gnu/libXcomposite.so.1 (0x00007fafdbcf6000)
libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007fafdbcf1000)
libxkbcommon.so.0 => /usr/lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007fafdbcaf000)
libwayland-cursor.so.0 => /usr/lib/x86_64-linux-gnu/libwayland-cursor.so.0 (0x00007fafdbca4000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fafdbc99000)
libthai.so.0 => /usr/lib/x86_64-linux-gnu/libthai.so.0 (0x00007fafdbc8c000)
libmount.so.1 => /lib/x86_64-linux-gnu/libmount.so.1 (0x00007fafdbc2c000)
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007fafdbc01000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fafdbbe5000)
libICE.so.6 => /usr/lib/x86_64-linux-gnu/libICE.so.6 (0x00007fafdbbc7000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fafdbbbc000)
libwebp.so.6 => /usr/lib/x86_64-linux-gnu/libwebp.so.6 (0x00007fafdb953000)
libzstd.so.1 => /usr/lib/x86_64-linux-gnu/libzstd.so.1 (0x00007fafdb8aa000)
libjbig.so.0 => /usr/lib/x86_64-linux-gnu/libjbig.so.0 (0x00007fafdb69c000)
libgcrypt.so.20 => /usr/lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007fafdb57e000)
libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007fafdb52b000)
libatspi.so.0 => /usr/lib/x86_64-linux-gnu/libatspi.so.0 (0x00007fafdb4f4000)
libgraphite2.so.3 => /usr/lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007fafdb4c7000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007fafdb4c1000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fafdb4b9000)
libunistring.so.2 => /usr/lib/x86_64-linux-gnu/libunistring.so.2 (0x00007fafdb335000)
libgnutls.so.30 => /usr/lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007fafdb15f000)
libhogweed.so.5 => /usr/lib/x86_64-linux-gnu/libhogweed.so.5 (0x00007fafdb127000)
libnettle.so.7 => /usr/lib/x86_64-linux-gnu/libnettle.so.7 (0x00007fafdb0ed000)
libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007fafdb069000)
libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007fafdaf8a000)
libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007fafdaf59000)
libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007fafdaf52000)
libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007fafdaf43000)
libsasl2.so.2 => /usr/lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007fafdaf26000)
libgssapi.so.3 => /usr/lib/x86_64-linux-gnu/libgssapi.so.3 (0x00007fafdaee1000)
libbrotlicommon.so.1 => /usr/lib/x86_64-linux-gnu/libbrotlicommon.so.1 (0x00007fafdaebc000)
libdatrie.so.1 => /usr/lib/x86_64-linux-gnu/libdatrie.so.1 (0x00007fafdaeb2000)
libblkid.so.1 => /lib/x86_64-linux-gnu/libblkid.so.1 (0x00007fafdae5b000)
libpcre2-8.so.0 => /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007fafdadcb000)
libbsd.so.0 => /usr/lib/x86_64-linux-gnu/libbsd.so.0 (0x00007fafdadb1000)
libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007fafdad8c000)
libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007fafdacdd000)
libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007fafdaba7000)
libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007fafdab91000)
libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007fafdab8a000)
libheimntlm.so.0 => /usr/lib/x86_64-linux-gnu/libheimntlm.so.0 (0x00007fafdab7c000)
libkrb5.so.26 => /usr/lib/x86_64-linux-gnu/libkrb5.so.26 (0x00007fafdaae9000)
libasn1.so.8 => /usr/lib/x86_64-linux-gnu/libasn1.so.8 (0x00007fafdaa42000)
libhcrypto.so.4 => /usr/lib/x86_64-linux-gnu/libhcrypto.so.4 (0x00007fafdaa0a000)
libroken.so.18 => /usr/lib/x86_64-linux-gnu/libroken.so.18 (0x00007fafda9f1000)
liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1 (0x00007fafda9ce000)
libwind.so.0 => /usr/lib/x86_64-linux-gnu/libwind.so.0 (0x00007fafda9a4000)
libheimbase.so.1 => /usr/lib/x86_64-linux-gnu/libheimbase.so.1 (0x00007fafda992000)
libhx509.so.5 => /usr/lib/x86_64-linux-gnu/libhx509.so.5 (0x00007fafda944000)
libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 (0x00007fafda81b000)
libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007fafda7e0000)