Python.h:没有那个文件或目录 错误的方法

在Linux上安装Python的MySQLdb的时候,提示

Python.h 没有那个文件或目录,
error: Setup script exited with error: command 'gcc' failed with exit status 1 

经过查阅资料才知道,需要安装好Python的静态库,头文件,
apt-get即可;

sudo apt-get install python-dev 

你可能感兴趣的:(python,gcc)