Python3.pc file not found with pkg-config

I am on a Ubuntu 14.04 machine that have python3 installed. In a make file I have flags that looks like this:

CFLAGS = -Wall -std=c11 -g -DNDEBUG `pkg-config --cflags python3`

I am getting the error when I run my make file:

gcc -Wall -std=c11 -g -DNDEBUG `pkg-config --cflags python3` -fPIC   -c -o calmodule.o calmodule.c
Package python3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `python3.pc'
to the PKG_CONFIG_PATH environment variable
No package 'python3' found
gcc -shared  calmodule.o calutil.o -o Cal.so

I checked the pkg-config folder and found nothing for python in there:

  % la /usr/lib/pkgconfig
total 20K
-rw-r--r-- 1 root root 288 Jul 22  2015 dbus-python.pc
-rw-r--r-- 1 root root 452 Jul 22  2015 ibus-table.pc
-rw-r--r-- 1 root root 245 Jul 12  2014 libquvi-scripts.pc
-rw-r--r-- 1 root root 379 Jul 10  2014 pm-utils.pc
-rw-r--r-- 1 root root 366 Sep 30 08:02 valgrind.pc

Shouldn't there be a python3.pc file in there? Or at the very least a specific one like python3.4.pc ?

Or am I doing something wrong here?

Answers


To resolve the problem it looks like I needed to get the python3-dev package.

Simply ran:

sudo apt-get install python3-dev

Need Your Help

Kendo Grid Aggregate Sum Displaying Empty Footer

.net razor kendo-grid

I am getting a footer with 0 value from this code. Anyone knows why please?

JSF2 annotations not working when using Spring

java spring java-ee jsf-2

I am having trouble getting the JSF annotations to work. I have spent some time trying to figure this out. I am useing Maven + Tomcat7 + JSF2.16 + JDK1.7 + Spring 3 + Hibernate 4.