Mailing List Archive

ZPyscopgDA for Windows XP
Dear Zopists

I am looking for ZPyscopgDA that works with Postgresql
8.0.3 on Windows. Can anyone point me to the URL?

I found an old version ZPyscopgDA ver 1.0.12 for
window binaries. However, it does not work with
Postgresql 8.0.3. My Zope version is 2.6.4.

Error message:
psycopg.OperationalError
could not create socket: An address incompatible with
the requested protocol was used. (0x0000273F)


Thanks




__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db
Re: ZPyscopgDA for Windows XP [ In reply to ]
On 2005-05-27 at 12:52:05 [+0200], Infor Gates <info_gates@yahoo.com> wrote:
> Dear Zopists
>
> I am looking for ZPyscopgDA that works with Postgresql
> 8.0.3 on Windows. Can anyone point me to the URL?
>
> I found an old version ZPyscopgDA ver 1.0.12 for
> window binaries. However, it does not work with
> Postgresql 8.0.3. My Zope version is 2.6.4.
>
> Error message:
> psycopg.OperationalError
> could not create socket: An address incompatible with
> the requested protocol was used. (0x0000273F)

Strange: I've got psycopg running fine with PostgreSQL 8 for Windows. But
that is with Python 2.3. It's really the psycopg drivers that you need
rather than the DA itself. What version of Python are you running? You
should be able to compile your own version. Alternatively you can use our
mxODBCZopeDA with the pgODBC driver as this definitely works.

Charlie
--
Charlie Clark
eGenix.com

Professional Python Services directly from the Source
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
_______________________________________________
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db
Re: ZPyscopgDA for Windows XP [ In reply to ]
Hi Infor,

> I am looking for ZPyscopgDA that works with Postgresql
> 8.0.3 on Windows. Can anyone point me to the URL?
>
> I found an old version ZPyscopgDA ver 1.0.12 for
> window binaries. However, it does not work with
> Postgresql 8.0.3. My Zope version is 2.6.4.
>
> Error message:
> psycopg.OperationalError
> could not create socket: An address incompatible with
> the requested protocol was used. (0x0000273F)
It seems that it is related to psycopg and not with ZPsycopgDA. You
could try to download the latest drivers for psycopg from this page:

http://www.stickpeople.com/projects/python/psycopg/

Last time I tried them, I think I was using the same version of
postgresql as you and the drivers for python 2.1, which were compiled
for Postgresql 7.3, and everything worked ok. The only thing I did was
changing the hostname from localhost by 127.0.0.1

Regards,
Josef

_______________________________________________
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db
Re: ZPyscopgDA for Windows XP [ In reply to ]
I am not "using" any python. Basically, it is using
Zope2.6.4's python 2.1.3. The ZPysopgDA or psycopg
1.0.12 is in the binaries format so I am not sure what
version of Python is used for compilation.

Any suggestions.

Thanks.


--- Charlie Clark <charlie@egenix.com> wrote:
>
> On 2005-05-27 at 12:52:05 [+0200], Infor Gates
> <info_gates@yahoo.com> wrote:
> > Dear Zopists
> >
> > I am looking for ZPyscopgDA that works with
> Postgresql
> > 8.0.3 on Windows. Can anyone point me to the URL?
> >
> > I found an old version ZPyscopgDA ver 1.0.12 for
> > window binaries. However, it does not work with
> > Postgresql 8.0.3. My Zope version is 2.6.4.
> >
> > Error message:
> > psycopg.OperationalError
> > could not create socket: An address incompatible
> with
> > the requested protocol was used. (0x0000273F)
>
> Strange: I've got psycopg running fine with
> PostgreSQL 8 for Windows. But
> that is with Python 2.3. It's really the psycopg
> drivers that you need
> rather than the DA itself. What version of Python
> are you running? You
> should be able to compile your own version.
> Alternatively you can use our
> mxODBCZopeDA with the pgODBC driver as this
> definitely works.
>
> Charlie
> --
> Charlie Clark
> eGenix.com
>
> Professional Python Services directly from the
> Source
> >>> Python/Zope Consulting and Support ...
> http://www.egenix.com/
> >>> mxODBC.Zope.Database.Adapter ...
> http://zope.egenix.com/
> >>> mxODBC, mxDateTime, mxTextTools ...
> http://python.egenix.com/
>
________________________________________________________________________
>
> ::: Try mxODBC.Zope.DA for
> Windows,Linux,Solaris,FreeBSD for free ! ::::
>



__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new Resources site
http://smallbusiness.yahoo.com/resources/
_______________________________________________
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db
Re: ZPyscopgDA for Windows XP [ In reply to ]
Hi Infor,

how did you install Zope and python: from source or did you install the
zope binary version that there is at the zope website? If you installed
the binary, which is my best guest, it doesn't have psycopg. You can
test if this by doing this on a windows console:

C:\> cd yourZopeFolder\bin
C:\> python
>>> from psycopg import *

Then, if you get an error, it means it isn't installed, so, you have
three alternatives to install it:

First alternative:
1.1 Install python 2.1.3 (If you don't have it)
1.2 Install the psycopg binaries
1.3 Copy the installed files to:
C:\YourZopeFolder\lib\python
If I'm not wrong, the binaries install a folder in lib\python2.1
1.4 You can uninstall python if you want
1.5 Start zope and try to create a psycopg connection

Second alternative:
2.1 Create a folder called Python in C:\
2.2 Create manualy this registry key:
[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.1\InstallPath]
2.3 Set its value to C:\Python
2.4 Copy the installed files to:
C:\YourZopeFolder\lib\python
2.5 Delete the registry key
2.6 Start zope and try to create a psycopg connection

Third alternative (I haven't done this in windows)
3.1 Compile python from source -> You will need a c compiler for this
3.2 Install pscopg from source using the previous python
3.3 Install zope from source and use the previous python -> I don't
know how this works under windows :-(

Regards,
Josef Meile


Infor Gates wrote:
> I am not "using" any python. Basically, it is using
> Zope2.6.4's python 2.1.3. The ZPysopgDA or psycopg
> 1.0.12 is in the binaries format so I am not sure what
> version of Python is used for compilation.
>
> Any suggestions.
>
> Thanks.
>
>
> --- Charlie Clark <charlie@egenix.com> wrote:
>
>>On 2005-05-27 at 12:52:05 [+0200], Infor Gates
>><info_gates@yahoo.com> wrote:
>>
>>>Dear Zopists
>>>
>>>I am looking for ZPyscopgDA that works with
>>
>>Postgresql
>>
>>>8.0.3 on Windows. Can anyone point me to the URL?
>>>
>>>I found an old version ZPyscopgDA ver 1.0.12 for
>>>window binaries. However, it does not work with
>>>Postgresql 8.0.3. My Zope version is 2.6.4.
>>>
>>>Error message:
>>>psycopg.OperationalError
>>>could not create socket: An address incompatible
>>
>>with
>>
>>>the requested protocol was used. (0x0000273F)
>>
>>Strange: I've got psycopg running fine with
>>PostgreSQL 8 for Windows. But
>>that is with Python 2.3. It's really the psycopg
>>drivers that you need
>>rather than the DA itself. What version of Python
>>are you running? You
>>should be able to compile your own version.
>>Alternatively you can use our
>>mxODBCZopeDA with the pgODBC driver as this
>>definitely works.
>>
>>Charlie
>>--
>>Charlie Clark
>>eGenix.com
>>
>>Professional Python Services directly from the
>>Source
>> >>> Python/Zope Consulting and Support ...
>>http://www.egenix.com/
>> >>> mxODBC.Zope.Database.Adapter ...
>>http://zope.egenix.com/
>> >>> mxODBC, mxDateTime, mxTextTools ...
>>http://python.egenix.com/
>>
>
> ________________________________________________________________________
>
>>::: Try mxODBC.Zope.DA for
>>Windows,Linux,Solaris,FreeBSD for free ! ::::
>>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Small Business - Try our new Resources site
> http://smallbusiness.yahoo.com/resources/


_______________________________________________
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db
Re: ZPyscopgDA for Windows XP [ In reply to ]
Hi Infor,

please post your replies to the list as well, so other can also help /
take advantage of this thread.

>Your best guest is correct (1st alternative).
>I had tried as suggested. However, it did not work.
>My best guess is that the psycopg binaries is compiled
>with PostgreSQL 7.x headers/lib for (cgywin). I am
>using PosgreSQL 8.0 for (native) windows. This is
>cause of it.
Yes, actually in the website I gave you there is a table, where the only
binaries for zope 2.6.4 you can download are the ones for python 2.1,
which were compiled for postgreSQL 7.3. So, you have to update your zope
to 2.7.x if you want to use binaries that work with postgreSQL 8. Now
I remmebered that was the version of zope I used.

But before installing psycopg you also need the egenix mx extensions:

http://www.egenix.com/files/python/eGenix-mx-Extensions.html

The link is now is broken I don't know if they are going to fix it. To
install this binaries, you can follow the procedure I indicated in my
previous reply.

>Is there psycopg (with ZpsycopgDA) compiled with Zope
>2.6.3(python2.1.3)/PostgreSQL8.0 headers/lib or do I
>need to make one myself. If so, how I can do it? I do
>not have MSVC++ compiler but have download Bloodshed
>C++.
I think there isn't such psycopg for the windows Zope binaries. The
problem is that what you need is Zope 2.6.4 compiled with a python that
has the psycopg module preinstalled on it. In fact, what you need to do
is:

1) Build python 2.1.3 from source
2) Build the genix mx extenssions from source using the python you
built
3) Build postgresql from source??? -> I'm not sure if psycopg needs
it, you have to check the readme and/or install files.
3) Build psycopg from source using the python of step 1
4) Build Zope 2.6.4 from source using the python you built.

Unfortunatelly, I haven't done this under windows, so, I can't help
you there. Anyway, the binaries worked for me once, but I haven't them
anymore and it was on zope 2.7, which uses python 2.3

Regards,
Josef Meile

_______________________________________________
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db
Re: ZPyscopgDA for Windows XP [ In reply to ]
My apologies. Actually, you are receiving resend of
an earlier email when I received a rejected reply from
the mail host server.

I have downloaded psycopg-2.0b2-win32-py23.exe.
python2.3 (windows versin) and Zope2.7.6 (windows
binaries). I had installed it. However, I had this
error message - MSVCR71.dll not found. I do not have
MSVC++ compiler.


I had attempted to compiled a version of my own by
downloading the source copy psycopg-2.0b3. I tried to
compiled as instructed using MingGW/Msys. I am still
not successful. I suspect that the postgresql
headers/includes are missing. However, I do not know
to confirm this when I look into Postgresql8.0
directories.

Your advice is much needed.

Thank you.

The error message:
-----------------
F:\>path
PATH=f:\Python23;f:\MinGW;f:\MinGW\bin;F:\MinGW\mingw32;F:\MinGW\mingw32\bin;F:\
MinGW\mingw32\lib;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;

F:\psycopg-2.0b3>python setup.py build_ext
--compiler=mingw32 install >log
In file included from psycopg\cursor_type.c:27:
./psycopg/config.h:81: warning: static declaration of
'round' follows non-static
declaration
./psycopg/config.h:63: warning: 'pthread_mutex_init'
defined but not used
./psycopg/config.h:70: warning: 'gmtime_r' defined but
not used
In file included from psycopg\adapter_binary.c:30:
./psycopg/config.h:81: warning: static declaration of
'round' follows non-static
declaration
./psycopg/config.h:63: warning: 'pthread_mutex_init'
defined but not used
./psycopg/config.h:70: warning: 'gmtime_r' defined but
not used
In file included from psycopg\connection_int.c:26:
./psycopg/config.h:81: warning: static declaration of
'round' follows non-static
declaration
./psycopg/config.h:63: warning: 'pthread_mutex_init'
defined but not used
./psycopg/config.h:70: warning: 'gmtime_r' defined but
not used
In file included from
psycopg\microprotocols_proto.c:29:
./psycopg/config.h:81: warning: static declaration of
'round' follows non-static
declaration
./psycopg/config.h:63: warning: 'pthread_mutex_init'
defined but not used
./psycopg/config.h:70: warning: 'gmtime_r' defined but
not used
In file included from psycopg\cursor_int.c:26:
./psycopg/config.h:81: warning: static declaration of
'round' follows non-static
declaration
./psycopg/config.h:63: warning: 'pthread_mutex_init'
defined but not used
./psycopg/config.h:70: warning: 'gmtime_r' defined but
not used
In file included from psycopg\microprotocols.c:26:
./psycopg/config.h:81: warning: static declaration of
'round' follows non-static
declaration
./psycopg/config.h:63: warning: 'pthread_mutex_init'
defined but not used
./psycopg/config.h:70: warning: 'gmtime_r' defined but
not used
In file included from psycopg\adapter_datetime.c:31:
./psycopg/config.h:81: warning: static declaration of
'round' follows non-static
declaration
./psycopg/config.h:63: warning: 'pthread_mutex_init'
defined but not used
In file included from psycopg\connection_type.c:29:
./psycopg/config.h:81: warning: static declaration of
'round' follows non-static
declaration
./psycopg/config.h:70: warning: 'gmtime_r' defined but
not used
In file included from psycopg\pqpath.c:32:
./psycopg/config.h:81: warning: static declaration of
'round' follows non-static
declaration
./psycopg/config.h:63: warning: 'pthread_mutex_init'
defined but not used
./psycopg/config.h:70: warning: 'gmtime_r' defined but
not used
In file included from psycopg\adapter_pboolean.c:28:
./psycopg/config.h:81: warning: static declaration of
'round' follows non-static
declaration
./psycopg/config.h:63: warning: 'pthread_mutex_init'
defined but not used
./psycopg/config.h:70: warning: 'gmtime_r' defined but
not used
In file included from psycopg\adapter_qstring.c:30:
./psycopg/config.h:81: warning: static declaration of
'round' follows non-static
declaration
./psycopg/config.h:63: warning: 'pthread_mutex_init'
defined but not used
./psycopg/config.h:70: warning: 'gmtime_r' defined but
not used
In file included from psycopg\adapter_list.c:27:
./psycopg/config.h:81: warning: static declaration of
'round' follows non-static
declaration
./psycopg/config.h:63: warning: 'pthread_mutex_init'
defined but not used
./psycopg/config.h:70: warning: 'gmtime_r' defined but
not used
In file included from psycopg\adapter_asis.c:28:
./psycopg/config.h:81: warning: static declaration of
'round' follows non-static
declaration
./psycopg/config.h:63: warning: 'pthread_mutex_init'
defined but not used
./psycopg/config.h:70: warning: 'gmtime_r' defined but
not used
In file included from psycopg\typecast.c:26:
./psycopg/config.h:81: warning: static declaration of
'round' follows non-static
declaration
./psycopg/config.h:63: warning: 'pthread_mutex_init'
defined but not used
./psycopg/config.h:70: warning: 'gmtime_r' defined but
not used
In file included from psycopg\psycopgmodule.c:25:
./psycopg/config.h:81: warning: static declaration of
'round' follows non-static
declaration
./psycopg/config.h:63: warning: 'pthread_mutex_init'
defined but not used
./psycopg/config.h:70: warning: 'gmtime_r' defined but
not used
f:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe:
cannot fin
d -lpython23
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

F:\psycopg-2.0b3>


--- Josef Meile <jmeile@hotmail.com> wrote:
> Hi Infor,
>
> please post your replies to the list as well, so
> other can also help /
> take advantage of this thread.
>
> >Your best guest is correct (1st alternative).
> >I had tried as suggested. However, it did not
> work.
> >My best guess is that the psycopg binaries is
> compiled
> >with PostgreSQL 7.x headers/lib for (cgywin). I am
> >using PosgreSQL 8.0 for (native) windows. This is
> >cause of it.
> Yes, actually in the website I gave you there is a
> table, where the only
> binaries for zope 2.6.4 you can download are the
> ones for python 2.1,
> which were compiled for postgreSQL 7.3. So, you have
> to update your zope
> to 2.7.x if you want to use binaries that work with
> postgreSQL 8. Now
> I remmebered that was the version of zope I used.
>
> But before installing psycopg you also need the
> egenix mx extensions:
>
>
http://www.egenix.com/files/python/eGenix-mx-Extensions.html
>
> The link is now is broken I don't know if they are
> going to fix it. To
> install this binaries, you can follow the procedure
> I indicated in my
> previous reply.
>
> >Is there psycopg (with ZpsycopgDA) compiled with
> Zope
> >2.6.3(python2.1.3)/PostgreSQL8.0 headers/lib or do
> I
> >need to make one myself. If so, how I can do it? I
> do
> >not have MSVC++ compiler but have download
> Bloodshed
> >C++.
> I think there isn't such psycopg for the windows
> Zope binaries. The
> problem is that what you need is Zope 2.6.4 compiled
> with a python that
> has the psycopg module preinstalled on it. In fact,
> what you need to do
> is:
>
> 1) Build python 2.1.3 from source
> 2) Build the genix mx extenssions from source using
> the python you
> built
> 3) Build postgresql from source??? -> I'm not sure
> if psycopg needs
> it, you have to check the readme and/or install
> files.
> 3) Build psycopg from source using the python of
> step 1
> 4) Build Zope 2.6.4 from source using the python you
> built.
>
> Unfortunatelly, I haven't done this under windows,
> so, I can't help
> you there. Anyway, the binaries worked for me once,
> but I haven't them
> anymore and it was on zope 2.7, which uses python
> 2.3
>
> Regards,
> Josef Meile
>
>



__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new Resources site
http://smallbusiness.yahoo.com/resources/
_______________________________________________
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db
Re: ZPyscopgDA for Windows XP [ In reply to ]
Hi Infor,

> I have downloaded psycopg-2.0b2-win32-py23.exe.
> python2.3 (windows versin) and Zope2.7.6 (windows
> binaries). I had installed it. However, I had this
> error message - MSVCR71.dll not found. I do not have
> MSVC++ compiler.
Yes, that's because the official python binary for windows is linked
against that dll. You may try pyMinGW, which is a patch to compile
python under MinGW and avoid such errors. You can get the patch and
the instrucctions here:

http://jove.prohosting.com/iwave/ipython/pyMinGW.html

However, I don't advice you to use the generated python by MinGW in a
production server since I have heard the binaries generated by this
compiler aren't optimized like the official distribution and it may be
a performance issue.

I would first try with the binaries as I said previously:

1) Install the python 2.3.4 binary
2) Install the egenix mxDateTime extension for python 2.3 [1]
3) Install the psycopg binary (again for python 2.3)
4) Copy everything related to the genix mx extensions and psycopg from
C:\python2.3\Lib\site-packages to
C:\YourZopeFolder\bin\Lib\site-packages

Generating your own binaries is also a nice homework, but if you are
thinking about using it in production environments, then you had better
use a decent C compiler. Even cgywin has been reported to produce a
slow python/zope binaries.

[1]: The Website www.egenix.com is now broken. Does anybody know where
can one get this package?

Regards,
Josef

_______________________________________________
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db
Re: ZPyscopgDA for Windows XP [ In reply to ]
Hi again,

> Yes, that's because the official python binary for windows is linked
> against that dll. You may try pyMinGW, which is a patch to compile
> python under MinGW and avoid such errors. You can get the patch and
> the instrucctions here:
>
> http://jove.prohosting.com/iwave/ipython/pyMinGW.html
You may not need pyMinGW. After reading the Install file of the psycopg,
it says:

"""
You can compile psycopg under Windows platform with mingw32 compiler.
The software required is:

[...] I skiped some text

3. build psycopg:

3.1. python setup.py build_ext --compiler=mingw32 install
"""

Please read it carefully, it answers your questions about the postgreSQL
headers as well.

Regards,
Josef

_______________________________________________
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db