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.
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.