when I try to install it via pip, or easy_install, it gives me error:
OSError: [Errno 2] No such file or directory: '/usr/include/pgsql/server'
How should I do this correctly?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You don’t have the PostgreSQL server include files or they are not located at the expected path on your system. See PyGreSQL Installation for more details on PyGreSQL compilation.
For example, on Ubuntu, you need to install postgresql-server-dev-all package to have server include files. On Fedora, it’s postgresql-devel.
Usually, pip will then use pg_config to find the correct path for these files.
Based on your error, pg_config has returned
'/usr/include/pgsql/server'as the location of server header files but they have not been installed on your system.