Cannot find <Python.h> on Debian 12 (bookworm)

38 views
Skip to first unread message

Sven Wehrend

unread,
Apr 28, 2024, 1:17:49 PMApr 28
to KiCad Developers
Hi there,
I've updated my system from Debian bullseye where I could successfully compile kicad, bnut had severe space issues to bookworm, in the hope that it would 
ease the kicad compiling. Sadly, I was not right, now I am confronted with this error:

[ 18%] Built target s3d_plugin_vrml
[ 18%] Building CXX object common/CMakeFiles/common.dir/tool/edit_points.cpp.o
[ 18%] Building CXX object common/CMakeFiles/common.dir/pgm_base.cpp.o
[ 18%] Building CXX object common/CMakeFiles/common.dir/tool/edit_constraints.cpp.o
In file included from /home/sven/development/software/kicad/common/pgm_base.cpp:60:
/home/sven/development/software/kicad/scripting/python_scripting.h:41:10: fatal error: Python.h: Datei oder Verzeichnis nicht gefunden
  41 | #include <Python.h>
     |          ^~~~~~~~~~
compilation terminated.
make[2]: *** [common/CMakeFiles/common.dir/build.make:3678: common/CMakeFiles/common.dir/pgm_base.cpp.o] Fehler 1
make[2]: *** Es wird auf noch nicht beendete Prozesse gewartet....
make[1]: *** [CMakeFiles/Makefile2:3250: common/CMakeFiles/common.dir/all] Fehler 2
make: *** [Makefile:166: all] Fehler 2

Despite, python3 and python3-dev being installed. I dont really understand the issue. This is on branch 8.0 ...
Any help appreciated.

Best,
Sven

Seth Hillbrand

unread,
Apr 28, 2024, 2:07:26 PMApr 28
to dev...@kicad.org
Usually, this means that your development environment is not correctly configured.

The easiest way to fix it is to delete your build directory and start fresh.

Alternatively, you can run `ccmake` in your build directory and manually update the python directories.  My guess is that bookworm uses python3.11 and bullseye used python3.9, so the directories still point to the old location

Seth

KiCad Services Corporation Logo
Seth Hillbrand
Lead Developer
+1-530-302-5483
Long Beach, CA
www.kipro-pcb.com    in...@kipro-pcb.com


--
You received this message because you are subscribed to the Google Groups "KiCad Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to devlist+u...@kicad.org.
To view this discussion on the web visit https://groups.google.com/a/kicad.org/d/msgid/devlist/b6257bad-dcc9-497c-9f87-17fc8f198f74n%40kicad.org.

Levente

unread,
Apr 28, 2024, 2:14:34 PMApr 28
to KiCad Developers
And install the python-is-python3 package.

Sven Wehrend

unread,
Apr 28, 2024, 2:39:49 PMApr 28
to KiCad Developers, se...@kipro-pcb.com
Thanks for the advice it seems to run  now.
And I want to excuse the "dumb" questions, its a while since I compiled software on a regular base, so I became a bit rusty... 

Best,
Sven Wehrend
Reply all
Reply to author
Forward
0 new messages