解决pip安装时提示"Python.h: No such file or directory"

今天用pip安装obfsproxy,安装提示报错:

1
fatal error: Python.h: No such file or directory compilation terminated.

搜得文章

gcc - fatal error: Python.h: No such file or directory - Stack Overflow

查得需安装python-dev(3.4的是python3-dev):

1
sudo apt-get install python-dev

重新安装obfsproxy无报错