在python调用c代码时,需要用到python.h文件,但这个文件没有在python编译器的默认安装包中,所以需要单独安装。 在ubuntu下: sudo apt-get install python-dev