Kicad Python3 support on windows

Hello,

I need to script KiCad with python3 for various reasons.
Default Kicad windows binaries are not built with “KICAD_SCRIPTING_PYTHON3” option “ON”.
I tried to build KiCad using msys2 but it seems wxpython 4 (supporting python3) has no msys packages.
I tried to build wxPython on msys, but this look to be quite a hard task as it detect a windows platform and try to build using VS (http://wxpython-users.1045709.n5.nabble.com/Install-wxPython-4-for-MSYS2-td5728732.html)

Is python3 support only on linux yet ?
Is it a plan to have a python3 windows build ?

Thank you.

The same problems you encountered are the reason why kicad is not packaged with python 3 for windows

2 Likes

You can have a py3 build on Windows but without wxpython. I do have an old 5.99 python3 build (with gcc) if you’re interested in. Or you might want to summon @nickoe to get you a fresh version.

From what I know most developers build with python support disabled (as it adds significantly to build time) so python issues are not really high on priority list. So we might wait until V6 to get py3 build on windows (I don’t see the team releasing windows version with py2 support). The best chance would be to build KiCad without python support with MSVC (this is doable now, and there should be some notes on the setup) and then work your way to get python. If you manage, I’d be happy to test it.

KiCad on Ubuntu 18.4 supports python3.

Mm, using MSVC with vcpkg is not really any solution either, it seems to only work for release builds for me. See:

https://jenkins.simonrichter.eu/job/windows-kicad-msvc-vcpkg/

But my notes for that job currently says:

There are still a number of issues with using vcpkg:

  1. This uses a findwxwidgets hack
  2. Not tested with opencascade
  3. Swig not available in vcpkg, so disabled all scripting

This means, no offical kicad release build with MSVC!

the ‘only’ stopper is wxpython 4 (with py3 support) built for windows msys2.
It would great if some developer could find a patch to build wxpython on msys2
@qu1ck did you get a chance to look at it?

1 Like

I did, and it’s not trivial. Don’t have bandwidth right now to tackle that issue. Maybe later after I get other things I volunteered for out of the way.

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