Missing Python.h in Arch | Linux Sheet
I use Arch Linux. I want to compile a C++ file that includes <Python.h>
.
But I can’t do it.
In Debian based systems this problem is resolved with sudo apt-get install python-dev
. How I can install this package with pacman?
* EDIT *
I wan’t to compile this file
C.c
#include "Python.h"
int main(int argc, char *argv[])
{
Py_SetProgramName(argv[0]); /* optional but recommended */
Py_Initialize();
PyRun_SimpleString("from time import time,ctimen"
"print 'Today is',ctime(time())n");
Py_Finalize();
return 0;
}
run this command:
g++ C.c
and i have this error:
call_function.c:1:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
Read more here: Source link