### Description
I tried package app_python3 and found this error on all dist where python3 is exist ``` [ 419s] CC (gcc) [M app_python.so] python_support.o [ 419s] python_support.c:22:20: fatal error: Python.h: No such file or directory [ 419s] #include <Python.h> [ 419s] ^ [ 419s] compilation terminated. [ 419s] make[2]: *** [python_support.o] Error 1 [ 419s] make[1]: *** [modules] Error 1 [ 419s] make[1]: Leaving directory `/home/abuild/rpmbuild/BUILD/kamailio-5.3.0-dev5/src' [ 419s] make: *** [every-module] Error 2 ``` But `Python.h` is present in system. Include dir and libsdir you can get using command `python3-config`. Like ``` # python3-config --includes -I/usr/include/python3.7m -I/usr/include/python3.7m # python3-config --libs -lpython3.7m -lpthread -ldl -lutil -lm ``` ### Possible Solutions
Update make files to use `python3-config`.
Error in `src/modules/app_python`. Not in `src/modules/app_python3` Think after installing `python3-devel`package.
```sh 6036873bedd1:/usr/src/packages/BUILD/kamailio-5.3.0-dev5 # make -C src/modules/app_python/ make: Entering directory '/usr/src/packages/BUILD/kamailio-5.3.0-dev5/src/modules/app_python' CC (gcc) [M app_python.so] python_support.o python_support.c:22:10: fatal error: Python.h: No such file or directory #include <Python.h> ^~~~~~~~~~ compilation terminated. make: *** [../../Makefile.rules:100: python_support.o] Error 1 make: Leaving directory '/usr/src/packages/BUILD/kamailio-5.3.0-dev5/src/modules/app_python' ```
That is not bag. Need to install both `python-devel` and `python3-devel` packages.
Closed #1959.