How to fix missing "Python.h" on Arch Linux?

Viewed 2576

Including "Python.h" in a C file:

#include <Python.h>

gives Python.h: No such file or directory error. I looked up for other people having the same problem and none gave a direct answer on how to install python*-dev (python2 and python3) on arch Linux. And by the way, this answer doesn't have an arch installation command.

1 Answers

Turns out "Python.h" is already installed on Arch, but just wasn't in the standard header files location gcc $(pkg-config --cflags python3) testing.c -o testing solved it for me.

Related