← Back to team overview

kicad-developers team mailing list archive

Re: Building with local Python3 etc

 

I now tried manually copying my system site-packages into the bundle:

cp -a /usr/local/lib/python3.9/site-packages/*
/Users/lijon/Coding/kicad/build/install_py3/KiCad.app/Contents/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/

Now when starting pcbnew, console gives a lot of:

Class wxSTCPopupBaseView is implemented in both
/Users/lijon/Coding/kicad/build/install_py3/KiCad.app/Contents/Frameworks/libwx_osx_cocoau-3.1.5.0.0.dylib
(0x10f13c8d8) and
/Users/lijon/Coding/kicad/build/install_py3/KiCad.app/Contents/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/wx/libwx_osx_cocoau_stc-3.1.5.0.0.dylib
(0x1198ddbf8). One of the two will be used. Which one is undefined.

And trying to open scripting console says:

Traceback (most recent call last):
  File "<string>", line 5, in <module>
  File "/Users/lijon/Coding/kicad/build/install_py3/KiCad.app/Contents/SharedSupport/scripting/kicad_pyshell/__init__.py",
line 230, in makePcbnewShellWindow
    pyshell = PcbnewPyShell(parent, id=-1, title=INTRO)
  File "/Users/lijon/Coding/kicad/build/install_py3/KiCad.app/Contents/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/wx/py/editor.py",
line 265, in __init__
    EditorFrame.__init__(self, parent, id, title, pos,
  File "/Users/lijon/Coding/kicad/build/install_py3/KiCad.app/Contents/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/wx/py/editor.py",
line 29, in __init__
    frame.Frame.__init__(self, parent, id, title, pos, size, style)
  File "/Users/lijon/Coding/kicad/build/install_py3/KiCad.app/Contents/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/wx/py/frame.py",
line 69, in __init__
    wx.Frame.__init__(self, parent, id, title, pos, size, style)
wx._core.PyNoAppError: The wx.App object must be created first!

Hopefully this helps!

On Thu, Apr 29, 2021 at 1:09 PM Jonatan Liljedahl <lijon@xxxxxxxxxxxx> wrote:
>
> So, I updated my CMake and tweaked some variables, and now 'make
> install' succeeds without "app verification failed". Also I can start
> pcbnew without crashing. However, trying to open the scripting console
> in pcbnew gives an error popup. The console reveals that it couldn't
> import the 'wx' module.
>
> During make install, I saw this:
>
> cp: cannot overwrite directory
> /Users/lijon/Coding/kicad/build/install_py3/KiCad.app/Contents/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages
> with non-directory
> /usr/local/Cellar/python@3.9/3.9.2_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages
>
> It's non-directory because it's a symlink. It points to
> /usr/local/lib/python3.9/site-packages, which does contain the 'wx'
> module.
>
> I've tried rerunning cmake with
> -DPYTHON_SITE_PACKAGE_PATH=/usr/local/lib/python3.9/site-packages but
> I get the same error at make install. Perhaps it's cached somewhere,
> how can I clear that without doing the whole build again from scratch?
> (which takes a couple of hours on my slow machine...)
>
> --
> /Jonatan
> http://kymatica.com



-- 
/Jonatan
http://kymatica.com


Follow ups

References