Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > (Python newbie) Using XP-SP2/MSVC6: No Python24_d.lib, winzip barfs on Python-2.4.1.tar, cannot download bzip2

Reply
Thread Tools

(Python newbie) Using XP-SP2/MSVC6: No Python24_d.lib, winzip barfs on Python-2.4.1.tar, cannot download bzip2

 
 
Bill Davy
Guest
Posts: n/a
 
      04-18-2005
I downlaoded and installed
http://www.python.org/ftp/python/2.4.1/python-2.4.1.msi

I'm trying to build an extension using SWIG 1.3.24 and the linker needs
python24_d.lib (I do not have the DLL either). I've not found it in any of
the
downloads.

So I tried to download the source to build it myself. Of
http://www.python.org/ftp/python/2.4...-2.4.1.tar.bz2 and
http://www.python.org/ftp/python/2.4.1/Python-2.4.1.tgz, WinZip (9.0 SR1)
just says "Error reading header after processing 0 entries".

Additionally, I've had no joy downloading the unzipper
(ftp://sources.redhat.com/pub/bzip2/v...-x86-win32.exe) from the
site cited for the unzipper (http://sources.redhat.com/bzip2/). It flashed
up a
black console window momentarily.

Oh, this is sooooo frustrating!

Can anyone point me in the right direction?

And then I can get to grips with my work.

tia
Bill


 
Reply With Quote
 
 
 
 
A.B., Khalid
Guest
Posts: n/a
 
      04-18-2005
Bill Davy wrote:
> I downlaoded and installed
> http://www.python.org/ftp/python/2.4.1/python-2.4.1.msi
>
> I'm trying to build an extension using SWIG 1.3.24 and the linker

needs
> python24_d.lib (I do not have the DLL either). I've not found it in

any of
> the
> downloads.
>
> So I tried to download the source to build it myself. Of
> http://www.python.org/ftp/python/2.4...-2.4.1.tar.bz2 and
> http://www.python.org/ftp/python/2.4.1/Python-2.4.1.tgz, WinZip (9.0

SR1)
> just says "Error reading header after processing 0 entries".
>
> Additionally, I've had no joy downloading the unzipper
> (ftp://sources.redhat.com/pub/bzip2/v...-x86-win32.exe)

from the
> site cited for the unzipper (http://sources.redhat.com/bzip2/). It

flashed
> up a
> black console window momentarily.
>
> Oh, this is sooooo frustrating!
>
> Can anyone point me in the right direction?
>
> And then I can get to grips with my work.
>
> tia
> Bill




I am no expert in MSVC6, but it sounds like maybe you need to supply
the no-debug switch in your extention setup.py file: /d NDEBUG.

In case that does not work and help on this is not forthcoming, you can
always try pyMinGW[1].


Regards,
Khalid



[1] pyMinGW:
http://jove.prohosting.com/iwave/ipython/pyMinGW.html

 
Reply With Quote
 
 
 
 
Bill Davy
Guest
Posts: n/a
 
      04-18-2005

"A.B., Khalid" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Bill Davy wrote:
>> I downlaoded and installed
>> http://www.python.org/ftp/python/2.4.1/python-2.4.1.msi
>>
>> I'm trying to build an extension using SWIG 1.3.24 and the linker

> needs
>> python24_d.lib (I do not have the DLL either). I've not found it in

> any of
>> the
>> downloads.


> I am no expert in MSVC6, but it sounds like maybe you need to supply
> the no-debug switch in your extention setup.py file: /d NDEBUG.
>
> In case that does not work and help on this is not forthcoming, you can
> always try pyMinGW[1].
>
>
> Regards,
> Khalid



Hmm, that's one possibility but I really do need to keep the debugger
version going. I'm only just getting started. Any other suggestions?


 
Reply With Quote
 
James Carroll
Guest
Posts: n/a
 
      04-18-2005
Hi Bill,

Python 2.4 requires VC7.1 I just ran into this recently. Once I
installed VC7.1, I could easily compile the Python source to create a
debug lib.

Winzip should be able to read the python source tarball... There is
one trick though. Once you download it, it might get renamed to
python.tar.gz.tar and the trick is to rename the file's extension to
..tar.gz or (my preference) .tgz.

If it really is a bzip2 file, then you'll need some sort of bunzip. I
use the cygnus version, but I don't remember having to do anything out
of the way for the python source.

-Jim

On 4/18/05, Bill Davy <(E-Mail Removed)> wrote:
>
> "A.B., Khalid" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) oups.com...
> > Bill Davy wrote:
> >> I downlaoded and installed
> >> http://www.python.org/ftp/python/2.4.1/python-2.4.1.msi
> >>
> >> I'm trying to build an extension using SWIG 1.3.24 and the linker

> > needs
> >> python24_d.lib (I do not have the DLL either). I've not found it in

> > any of
> >> the
> >> downloads.

>
> > I am no expert in MSVC6, but it sounds like maybe you need to supply
> > the no-debug switch in your extention setup.py file: /d NDEBUG.
> >
> > In case that does not work and help on this is not forthcoming, you can
> > always try pyMinGW[1].
> >
> >
> > Regards,
> > Khalid

>
> Hmm, that's one possibility but I really do need to keep the debugger
> version going. I'm only just getting started. Any other suggestions?
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>

 
Reply With Quote
 
Bill Davy
Guest
Posts: n/a
 
      04-19-2005
Hi,
Many thanks for this.
I am constrained to use MSVC6 (customer) but will look to see if I can run
VC7.1 alongside VC6.
However, I am still unable to decompress/unpack the downloaded source files
even with their extensions amended.
Am I really the only person having this difficulty?
Hey ho,
Bill

"James Carroll" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
Hi Bill,

Python 2.4 requires VC7.1 I just ran into this recently. Once I
installed VC7.1, I could easily compile the Python source to create a
debug lib.

Winzip should be able to read the python source tarball... There is
one trick though. Once you download it, it might get renamed to
python.tar.gz.tar and the trick is to rename the file's extension to
..tar.gz or (my preference) .tgz.

If it really is a bzip2 file, then you'll need some sort of bunzip. I
use the cygnus version, but I don't remember having to do anything out
of the way for the python source.

-Jim

On 4/18/05, Bill Davy <(E-Mail Removed)> wrote:
>
> "A.B., Khalid" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed) oups.com...
> > Bill Davy wrote:
> >> I downlaoded and installed
> >> http://www.python.org/ftp/python/2.4.1/python-2.4.1.msi
> >>
> >> I'm trying to build an extension using SWIG 1.3.24 and the linker

> > needs
> >> python24_d.lib (I do not have the DLL either). I've not found it in

> > any of
> >> the
> >> downloads.

>
> > I am no expert in MSVC6, but it sounds like maybe you need to supply
> > the no-debug switch in your extention setup.py file: /d NDEBUG.
> >
> > In case that does not work and help on this is not forthcoming, you can
> > always try pyMinGW[1].
> >
> >
> > Regards,
> > Khalid

>
> Hmm, that's one possibility but I really do need to keep the debugger
> version going. I'm only just getting started. Any other suggestions?
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>



 
Reply With Quote
 
A.B., Khalid
Guest
Posts: n/a
 
      04-19-2005
Okay, let me have another stap at this.

As you have probably noticed MSVC6 is no longer actively supported as
far as Python 2.4 goes. The official distribution of Python 2.4 for
Windows is built using MSVC7.1 (or whatever you wish to call it).

We are told that building C extensions with MSVC6 for use in the
official Python 2.4 (which uses the MSVCR71) is not safe, and mixing
the different runtime libraries that your extension (or my extension)
with that which official Python 2.4 uses will/might cause crashes.
Google around for details on this.

So, what to do? You seem to have four options.

1. Get and use the MSVC7.1 compiler.
2. Get and use the freely distributed MS compiler.
3. Download the Python source[1] and compile it yourself in MSVC6
(there are project files in the source to enable you to do that). Then
use your MSVC6 to create the extension.
4. Get and use MinGW and pyMinGW[2]




Regards,
Khalid




[1] Check to see if your archiever tool is working, or get the source
from CVS.

[2] pyMinGW:
http://jove.prohosting.com/iwave/ipython/pyMinGW.html

 
Reply With Quote
 
Jaime Wyant
Guest
Posts: n/a
 
      04-19-2005
I fight the python24_d.lib problem with swig daily. The way I got
around it was to modify swig's python configuration module. Mine was
located at

/lib/swig1.3/python/python.swg

(I'm using cygwin)

At the top, I changed

#include "python.h"

to

#ifdef _DEBUG
#undef _DEBUG
#include "python.h"
#define _DEBUG
#else
#include "python.h"
#endif

Somewhere in the includes, python uses a pragma telling the MSVC
compiler which library to link the object files against. Because
you're building a _DEBUG build, you magically get the python24_d.lib
library.

hth,
jw

On 4/18/05, Bill Davy <(E-Mail Removed)> wrote:
> I downlaoded and installed
> http://www.python.org/ftp/python/2.4.1/python-2.4.1.msi
>
> I'm trying to build an extension using SWIG 1.3.24 and the linker needs
> python24_d.lib (I do not have the DLL either). I've not found it in any of
> the
> downloads.
>
> So I tried to download the source to build it myself. Of
> http://www.python.org/ftp/python/2.4...-2.4.1.tar.bz2 and
> http://www.python.org/ftp/python/2.4.1/Python-2.4.1.tgz, WinZip (9.0 SR1)
> just says "Error reading header after processing 0 entries".
>
> Additionally, I've had no joy downloading the unzipper
> (ftp://sources.redhat.com/pub/bzip2/v...-x86-win32.exe) from the
> site cited for the unzipper (http://sources.redhat.com/bzip2/). It flashed
> up a
> black console window momentarily.
>
> Oh, this is sooooo frustrating!
>
> Can anyone point me in the right direction?
>
> And then I can get to grips with my work.
>
> tia
> Bill
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>

 
Reply With Quote
 
Bill Davy
Guest
Posts: n/a
 
      04-20-2005
Thank you Khalid,



OK. (4) (compile using MSVC6) worked.



Now working through various issues to do with paths and naming (_d suffix to
root for DEBUG, _ prefix to root for SWIG, and I had not spotted that SWIG
makes Module.py that imports _Module.pyd but not _Module_d.pyd for DEBUG
builds).



I'd like to persuade IDLE to use my locally compiled version of Python
rather than the one I downloaded, and will find out how eventually.
Necessary to keep to a VC6 build of 2.4.1 throughout.



Rgds,

Bill (an inveterate top poster, I'm afraid).


"A.B., Khalid" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Okay, let me have another stap at this.
>
> As you have probably noticed MSVC6 is no longer actively supported as
> far as Python 2.4 goes. The official distribution of Python 2.4 for
> Windows is built using MSVC7.1 (or whatever you wish to call it).
>
> We are told that building C extensions with MSVC6 for use in the
> official Python 2.4 (which uses the MSVCR71) is not safe, and mixing
> the different runtime libraries that your extension (or my extension)
> with that which official Python 2.4 uses will/might cause crashes.
> Google around for details on this.
>
> So, what to do? You seem to have four options.
>
> 1. Get and use the MSVC7.1 compiler.
> 2. Get and use the freely distributed MS compiler.
> 3. Download the Python source[1] and compile it yourself in MSVC6
> (there are project files in the source to enable you to do that). Then
> use your MSVC6 to create the extension.
> 4. Get and use MinGW and pyMinGW[2]
>
>
>
>
> Regards,
> Khalid
>
>
>
>
> [1] Check to see if your archiever tool is working, or get the source
> from CVS.
>
> [2] pyMinGW:
> http://jove.prohosting.com/iwave/ipython/pyMinGW.html
>



 
Reply With Quote
 
Bill Davy
Guest
Posts: n/a
 
      04-20-2005
Thanks Jaime,

I'm making gradual progress and am finding it quite satisfying. Resorted to
tracing Python in MSVC6 to see what it was trying to IMPORT, which is a bit
heavy but thank heavens for the sources.

Had not thouight of "adapting" SWIG, and will think about it when I have a
clearer view of what I am doing (rather deeply embedded at present, trying
to get one success). I had not spotted SWIG's wrapper round a wrapper
(Module.py imports _Module.pyd) but it's reasonable except they go into
different directories. And there's the _d too, of course

Many thanks for your help,

Bill

"Jaime Wyant" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
I fight the python24_d.lib problem with swig daily. The way I got
around it was to modify swig's python configuration module. Mine was
located at

/lib/swig1.3/python/python.swg

(I'm using cygwin)

At the top, I changed

#include "python.h"

to

#ifdef _DEBUG
#undef _DEBUG
#include "python.h"
#define _DEBUG
#else
#include "python.h"
#endif

Somewhere in the includes, python uses a pragma telling the MSVC
compiler which library to link the object files against. Because
you're building a _DEBUG build, you magically get the python24_d.lib
library.

hth,
jw

On 4/18/05, Bill Davy <(E-Mail Removed)> wrote:
> I downlaoded and installed
> http://www.python.org/ftp/python/2.4.1/python-2.4.1.msi
>
> I'm trying to build an extension using SWIG 1.3.24 and the linker needs
> python24_d.lib (I do not have the DLL either). I've not found it in any
> of
> the
> downloads.
>
> So I tried to download the source to build it myself. Of
> http://www.python.org/ftp/python/2.4...-2.4.1.tar.bz2 and
> http://www.python.org/ftp/python/2.4.1/Python-2.4.1.tgz, WinZip (9.0 SR1)
> just says "Error reading header after processing 0 entries".
>
> Additionally, I've had no joy downloading the unzipper
> (ftp://sources.redhat.com/pub/bzip2/v...-x86-win32.exe) from the
> site cited for the unzipper (http://sources.redhat.com/bzip2/). It
> flashed
> up a
> black console window momentarily.
>
> Oh, this is sooooo frustrating!
>
> Can anyone point me in the right direction?
>
> And then I can get to grips with my work.
>
> tia
> Bill
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>



 
Reply With Quote
 
Scott David Daniels
Guest
Posts: n/a
 
      04-20-2005
Bill Davy wrote:
> Thanks Jaime,
>
> I'm making gradual progress and am finding it quite satisfying. Resorted to
> tracing Python in MSVC6 to see what it was trying to IMPORT, which is a bit
> heavy but thank heavens for the sources.

You might try running python from a command window and running it "-v"
as in:

python -v prog.py -args ...

--Scott David Daniels
http://www.velocityreviews.com/forums/(E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
multicpu bzip2 using os.system or queue using python script harijay Python 2 07-27-2010 06:10 PM
BZip2 Compression with Apache Ant's BZip2 tools.....problem TSchultz55 Java 0 07-26-2005 03:21 PM
Re: (Python newbie) Using XP-SP2/MSVC6: No Python24_d.lib,winzip barfs on Python-2.4.1.tar, cannot download bzip2 Jaime Wyant Python 0 04-21-2005 12:49 PM
RE: (Python newbie) Using XP-SP2/MSVC6: No Python24_d.lib,winzip barfs on Python-2.4.1.tar, cannot download bzip2 Bill Davy Python 0 04-19-2005 09:27 AM
Response.AppendHeader barfs Timo ASP .Net 0 03-23-2005 09:11 PM



Advertisments