psycopg:Python.h:没有这样的文件或目录


问题内容

我正在编译psycopg2并收到以下错误: Python.h:没有这样的文件或目录

如何编译,Ubuntu12 x64。


问题答案:

Python 2:

sudo apt-get install python-dev

Python 3:

sudo apt-get install python3-dev