在新配置的服务器中为python安装模块时报编译器错误


在安装需要编译的python模块时,出现如下错误:

error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

在debian/ubuntu中执行如下操作即可:

sudo apt-get install python-dev

这个包的解释如下:
Python.h is nothing but a header file. It is used by gcc to build applications. You need to install a package called python-dev. This package includes header files, a static library and development tools for building Python modules, extending the Python interpreter or embedding Python in applications.

普人特福的博客cnzz&51la for wordpress,cnzz for wordpress,51la for wordpress