psycopg: Python.h: No such file or directory - TagMerge
3psycopg: Python.h: No such file or directorypsycopg: Python.h: No such file or directory

psycopg: Python.h: No such file or directory

Asked 1 years ago
61
3 answers

Python 2:

sudo apt-get install python-dev

Python 3:

sudo apt-get install python3-dev

Source: link

25

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<version>-dev

For example 3.5 as alternative:

sudo apt-get install python3.5-dev

Source: link

8

if you take a look at PostgreSQL's faq page ( http://initd.org/psycopg/docs/faq.html ) you'll see that they recommend installing pythons development package, which is usually called python-dev. You can install via

sudo apt-get install python-dev

Source: link

Recent Questions on python

    Programming Languages