Search code examples
pythonpsycopg2

psycopg: Python.h: No such file or directory


I'm compiling psycopg2 and get the following error: Python.h: No such file or directory

How to compile it, Ubuntu12 x64.


Solution

  • Python 2:

    sudo apt-get install python-dev
    

    Python 3:

    sudo apt-get install python3-dev