[solved] Can't run Pcbnew with Python 3.4 on Windows

I had a lot of trouble getting Pcbnew and the footprint editor to work, even in earlier versions from last year. It kept crashing and closing KiCad without error output.

I finally found the solution by changing my default Python version in Windows 10 environment variables (PATH, PYTHONHOME) to Python 2.7 (previously 3.4). My issue is that I’m working with 3.4 on other projects and hate to have to constantly shuffle around my configuration every time I want to use one or the other software. Is there any way to configure my KiCad installation to use my Python 2.7 installation without going through the system’s environment variables?

Isn’t KiCAD using the python that is in it’s own installation folder?

C:\Program Files\KiCad\lib\python2.7

I got python 2.7.11 installed on my win7 system and the command line in PCBnew is reporting 2.7.10, so for me it’s definitely not using the system python, but it’s own…?!
Running a command line in

C:\Program Files\KiCad\bin\python.exe

reports 2.7.10 to me.

KiCad tried to run its scripts with my default Python 3.4 installation. The environment variables PATH, PYTHONHOME and PYTHONPATH seem to block the program from selecting its local version. I fixed it by removing those variables entirely, which is actually recommended according to the internet. It doesn’t interfere with my other Python 3 programs so far, so that’s good.

(On a side note: I also once set the env. vars to my machine’s Python 2.7 installation, which made me able to run Pcbnew, but with some error messages on startup which did not seem to affect functionality on brief inspection.)

1 Like

Python 2.7.12 is the latest 2.7 series bugfix and EOL is still 2020. KiCad should really be aiming to migrate to v3 now though

3 Likes

Unfortunately still not a target for v6.


The clock ticks. V6.0.0 probably won’t be released before this date.
2 Likes

Python 3 port is currently in progress: https://github.com/pointhi/kicad-source-mirror/tree/python3

More details in this thread: Moving from Python to Lisp/Lua

1 Like

@pointhi any news on it?
It would be great to have k6 w/ py3 …

All that is needed is some dependency (i think wx stuff) to be available under windows for python 3 (I think nearly all linux distros are already on python 3) I am not sure the KiCad project itself can do much about it unless it takes over the “support” for yet another library.

The Footprint Wizard is now also running. I managed to get it running with wx3.1 and gtk3 on Linux (some other config variants caused gui issues).

Thanks to @nickoe we also have a working windows build now: https://jenkins.simonrichter.eu:8443/job/windows-kicad-msys2-patch/89/

From: