installing psycopg2-2.0.13 with python3.1
Philip Semanchuk
philip at semanchuk.com
Wed Jan 20 18:58:37 EST 2010
On Jan 20, 2010, at 5:45 PM, Iain Barnett wrote:
> Hi,
>
> Would anyone know if it's possible to install psycopg2-2.0.13 with
> python3.1.1 (or similar)? When I try I get the following
>
> $ sudo python setup.py install
> Password:
> File "setup.py", line 233
> except Warning, w:
> ^
> SyntaxError: invalid syntax
>
>
> I can install it with python2.6 with no problems, but obviously I'd
> prefer to use the latest version. My system is OSX10.6, and I'm new
> to Python.
Hi Iain,
I've been out of the psycopg loop for a while now, but my guess is
that the answer to your question is no. There are some Python 3-
related checkins in the psycopg2 repository, but it looks like they're
not ready for public use yet (unless you're adventurous).
Here's the source repository, which contains a commit commented "First
round of changes for Python 3":
https://dndg.it/cgi-bin/gitweb.cgi?p=public/psycopg2.git
If you scroll to the bottom of that page you'll see a "head" created
especially for Python 2 which is where 2.0.13 came from.
If you're willing to do some hacking on your own, Martin v. Löwis
ported psycopg2 to Python 3 and provided a diff:
http://mail.python.org/pipermail/python-porting/2008-December/000018.html
Last but not least, I should note that psycopg has its own mailing
list, and I bet they know more about it there:
http://lists.initd.org/mailman/listinfo/psycopg
Hope this helps. Psycopg & Postgres both worked wonderfully well for me.
Cheers
Philip
More information about the Python-list
mailing list