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?
To resolve the problem it looks like I needed to get the python3-dev
package.
Simply ran:
sudo apt-get install python3-dev
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.