psycopg: Python.h: No such file or directory

后端 未结 4 1468
野性不改
野性不改 2021-01-07 16:34

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

How to compile it, Ubuntu12 x64.

4条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-07 16:48

    This is a dependency issue.

    I resolved this issue on Ubuntu using apt-get. Substitute it with a package manager appropriate to your system.

    For any current Python version:

    sudo apt-get install python-dev
    

    For alternative Python version:

    sudo apt-get install python-dev
    

    For example 3.5 as alternative:

    sudo apt-get install python3.5-dev
    

提交回复
热议问题