Author Topic: KiCad incompatible with Python 3.14  (Read 3909 times)

0 Members and 1 Guest are viewing this topic.

Offline JohanHTopic starter

  • Frequent Contributor
  • **
  • Posts: 836
  • Country: fi
KiCad incompatible with Python 3.14
« on: October 31, 2025, 03:24:48 pm »
There is a change in Python 3.14 that causes KiCad to crash upon startup.

This makes the RPM variant of KiCad not working in the newly released Fedora 43. However, the flatpak works, so I'm using that now. My impression has been that there have always been some small quirks with the flatpak variant, that's why I've kept using the natively compiled RPM. The flatpak mostly seems to work for now (crashed once, and yesterday dialog option lists couldn't be clicked with a mouse, had to use Enter and arrow keys, but today it works; how odd is that).

The Python bug is reported here: https://github.com/python/cpython/issues/139653
The bug also affects some other applications.
 

Offline John B

  • Super Contributor
  • ***
  • Posts: 1078
  • Country: au
Re: KiCad incompatible with Python 3.14
« Reply #1 on: November 02, 2025, 11:40:41 pm »
I'm using the RPM version and it seems to be working OK on Fedora 43 now.

I was going to hold off upgrading for a while, but it turns out that KDE sddm broke on F42 in the latest updates, maybe along with something else, so I was unable to boot to a display manager.

F43 had more up to date packages so I took a gamble it would be fixed, and now I'm back online. ¯\_(ツ)_/¯

These are the exact versions for anyone wondering:
Python 3.14.0
kicad.x86_64 1:9.0.5-1.fc43
« Last Edit: November 02, 2025, 11:44:59 pm by John B »
 

Offline JohanHTopic starter

  • Frequent Contributor
  • **
  • Posts: 836
  • Country: fi
Re: KiCad incompatible with Python 3.14
« Reply #2 on: November 03, 2025, 11:28:13 am »
Interesting, maybe I have to try the RPM variant again. Although the bug made it quite clear it was a python issue that won't be fixed until 3.14.1 or so. But maybe it depends on some other circumstances, you never know.
 

Offline JohanHTopic starter

  • Frequent Contributor
  • **
  • Posts: 836
  • Country: fi
Re: KiCad incompatible with Python 3.14
« Reply #3 on: November 05, 2025, 10:57:54 am »
I tried installing the RPM again, but it crashes as soon as I try to start the Schematic Editor. So I'm back with the flatpack.
 

Offline John B

  • Super Contributor
  • ***
  • Posts: 1078
  • Country: au
Re: KiCad incompatible with Python 3.14
« Reply #4 on: November 05, 2025, 10:45:48 pm »
Weird, I have opened all programs on the main menu (PCB, schematic, symbol, footprint editors, caluclator etc) and nothing is crashing for me on first start up.

But I did notice that plugins aren't working. Currently I only have the Interactive HTML BOM and Board2PDF plugins installed as shown on the plugin manager, but they don't show up on the PCB editor. Maybe they are a source of crashes, and for some reason are being disabled on my setup?

Also I wonder if KiCAD is using different python interpreter versions depending on what is installed. Although my system python version is 3.14, perhaps KiCAD can use older ones.
 

Offline Michael-VK2BEA

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: KiCad incompatible with Python 3.14
« Reply #5 on: November 06, 2025, 09:59:59 pm »
Doesn't work for me with Python 3.14
Code: [Select]
😼 kicad-nightly
Fatal Python error: _Py_CheckRecursiveCall: Unrecoverable stack overflow (used -120922 kB) while calling a Python object
Python runtime state: initialized

Current thread 0x00007f8eeb7473c0 [kicad] (most recent call first):
  <no Python frame>
/usr/bin/kicad-nightly: line 5: 1572457 Aborted                    (core dumped) /usr/lib64/kicad-nightly/bin/kicad "$@"


 

Offline JohanHTopic starter

  • Frequent Contributor
  • **
  • Posts: 836
  • Country: fi
Re: KiCad incompatible with Python 3.14
« Reply #6 on: November 07, 2025, 07:11:16 am »
It's quite clear from both the Python bug https://github.com/python/cpython/issues/139653 and the KiCad bug https://gitlab.com/kicad/code/kicad/-/issues/21890#note_2800807662 that it won't work until they fix the bug in python 3.14. So we can only wait.
 

Offline Michael-VK2BEA

  • Regular Contributor
  • *
  • Posts: 54
  • Country: us
Re: KiCad incompatible with Python 3.14
« Reply #7 on: November 07, 2025, 04:11:01 pm »
I can install the flatpak version of KiCAD stable and get that to work on Fedora 43 but I've been using the nightly builds so my designs won't open with the stable build.
I tried building the flakpak for the nightly but it always fails. Does anyone know of a source of nightly flatpaks?
 

Offline JohanHTopic starter

  • Frequent Contributor
  • **
  • Posts: 836
  • Country: fi
Re: KiCad incompatible with Python 3.14
« Reply #8 on: November 07, 2025, 04:32:56 pm »
I can install the flatpak version of KiCAD stable and get that to work on Fedora 43 but I've been using the nightly builds so my designs won't open with the stable build.
I tried building the flakpak for the nightly but it always fails. Does anyone know of a source of nightly flatpaks?

I don't think there is a nightly flatpak.

I remember doing this in a past release a couple of years ago. I managed to manually convert my project files at that time back to the stable version. I did it by taking a copy of the project, then comparing to a project created by the stable version, changing the version numbers in the files to be the same, then opening the project files with the stable version, and for every error, check the syntax at that row in the file and change it back to how the syntax looked in the project files of the stable version (or removing any new property or similar that had been added by the nightly build). If you manage to finally open the files, do a Save As again to create new files (not sure if this step helps, but can't hurt). You try to do this at your own risk, no guarantees that it works anymore.
 

Offline JohanHTopic starter

  • Frequent Contributor
  • **
  • Posts: 836
  • Country: fi
Re: KiCad incompatible with Python 3.14
« Reply #9 on: December 04, 2025, 07:29:04 pm »
Even Linus Torvalds noticed this issue:

https://bugzilla.redhat.com/show_bug.cgi?id=2416523

Python 3.14.1 is released with this supposedly fixed. Just waiting for it to become available.

Now the flatpak is a hit and miss affair. Depending on the day of the week it works badly or worse. Dialogs freezing, 3D viewer freezing etc. I have to run it with
Code: [Select]
flatpak run --env=GDK_BACKEND=x11 org.kicad.KiCadto make it work at all.
 

Offline JohanHTopic starter

  • Frequent Contributor
  • **
  • Posts: 836
  • Country: fi
Re: KiCad incompatible with Python 3.14
« Reply #10 on: December 05, 2025, 12:25:31 pm »
I seem to have some success running KiCad in a Fedora 42 container. This was suggested in the Fedora forum: https://discussion.fedoraproject.org/t/kicad-and-fedora-43/175578/13

I would change the setup command to this:

Quote
$ sudo dnf install distrobox podman
$ distrobox assemble create --file /dev/stdin << EOI
[f42]
image="fedora:42"
additional_packages="kicad kicad-packages3d kicad-doc xorg-x11-server-Xwayland @base-x"
exported_apps="bitmap2component eeschema gerbview kicad pcbnew"
EOI

You will get desktop shortcuts named e.g. "KiCad (on f42)".

Edit the desktop shortcuts that are created under your profile like so (using your favorite text editor):
$ nano ~/.local/share/applications/f42-org.kicad.kicad.desktop

Modify the Exec line:
Quote
Exec=/usr/bin/distrobox-enter --additional-flags “–env GDK_BACKEND=x11” -n f42  –   kicad  %f

Now KiCad will start in the podman container and run under an Xwayland (x11) session.
« Last Edit: December 05, 2025, 12:35:18 pm by JohanH »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->