ubuntu下安装twisted
首先从 http://twistedmatrix.com/trac/ 下载源码,解压后,python setup.py install
出现以下错误 twisted/runner/portmap.c:10:20: error:Python.h:No such file or directory
在stackoverflow上搜到答案 http://stackoverflow.com/questions/8629198/twisted-installation-failed-on-linux
The compiler can't find python development headers.
Asking the system administrator to install python-devel
in case of CentOS or to install python-dev
on Debian, Ubuntu and their derivatives. That should help.
所以最后的方法就是
sudo apt-get install python-dev
sudo setup.py install