[pypy-dev] Fail to compile psycopg2

Alex Gaynor alex.gaynor at gmail.com
Fri May 24 07:40:59 CEST 2013


Hi Steve,

In general you probably want to avoid C-extensions when running under PyPy.
In this case I reccomend using psycopg2cffi instead:
https://pypi.python.org/pypi/psycopg2cffi it's basically a drop-in
replacement and works well under PyPy.

Alex


On Fri, May 24, 2013 at 1:36 AM, Steve Kieu <msh.computing at gmail.com> wrote:

> Hello All,
>
> I tried to install psycopg2 but failed with the following message
>
>
> building 'psycopg2._psycopg' extension
>
> cc -O2 -fPIC -Wimplicit -DPSYCOPG_DEFAULT_PYDATETIME=1
> -DPSYCOPG_VERSION="2.5 (dt dec pq3 ext)" -DPG_VERSION_HEX=0x090109
> -DPSYCOPG_EXTENSIONS=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1
> -I/home/stevek/pypy/include -I. -I/usr/include/postgresql
> -I/usr/include/postgresql/9.1/server -c psycopg/psycopgmodule.c -o
> build/temp.linux-x86_64-2.7/psycopg/psycopgmodule.o
> -Wdeclaration-after-statement
>
> In file included from psycopg/psycopgmodule.c:38:0:
>
> ./psycopg/error.h:32:5: error: unknown type name ‘PyBaseExceptionObject’
>
> error: command 'cc' failed with exit status 1
>
>
> Looks like the python header from pypy does not declare
> PyBaseExceptionObject
>
> Any way to fix this?
>
> Thanks in adanvace,
>
>
>
> --
> Steve Kieu
>
> _______________________________________________
> pypy-dev mailing list
> pypy-dev at python.org
> http://mail.python.org/mailman/listinfo/pypy-dev
>
>


-- 
"I disapprove of what you say, but I will defend to the death your right to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
GPG Key fingerprint: 125F 5C67 DFE9 4084
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20130524/9cd574af/attachment.html>


More information about the pypy-dev mailing list