可以使用命令apt-cache show python2.7查看到你安装python-2.7 2.7.3-0ubuntu3.1是从源precise-updates/main安装的,而python2.7-dev默认是从源precise/main安装的,因此安装python2.7-dev之前需要更新软件源。
在Ubuntu下写python代码的时候,有时会需要安装一些第三方的库,安装的时候提示:SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev. 然后按照提示sudo apt-get install Python-dev又出错,提示: