我想用#include <Python.h>
编译文件
但这引起了fatal error: Python.h: No such file or directory
。
尽管已安装Python.h
。
我已经在Ubuntu 18.10上使用sudo apt-get install python3-dev
。我可以用locate Python.h
找到该包。
gcc -fPIC fib*.cfib_wrap.c:149:11: fatal error: Python.h: No such file or directory
# include <Python.h>
locate Python.h
/home/constantin/.platformio/penv/include/python2.7/Python.h
/home/constantin/anaconda3/include/python3.6m/Python.h
/home/constantin/anaconda3/pkgs/python-2.7.15-h1571d57_0/include/python2.7/Python.h
/home/constantin/anaconda3/pkgs/python-2.7.15-h9bab390_4/include/python2.7/Python.h
/home/constantin/anaconda3/pkgs/python-3.6.4-hc3d631a_1/include/python3.6m/Python.h
/snap/gimp/113/usr/include/python2.7/Python.h
/snap/gimp/130/usr/include/python2.7/Python.h
/snap/gimp/165/usr/include/python2.7/Python.h
/usr/include/python2.7/Python.h