Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #43214 > unrolled thread

py2exe and 64/32 bit windows

Started byGrant Edwards <invalid@invalid.invalid>
First post2013-04-09 18:17 +0000
Last post2013-04-09 13:05 -0700
Articles 5 — 3 participants

Back to article view | Back to comp.lang.python


Contents

  py2exe and 64/32 bit windows Grant Edwards <invalid@invalid.invalid> - 2013-04-09 18:17 +0000
    Re: py2exe and 64/32 bit windows Ian Kelly <ian.g.kelly@gmail.com> - 2013-04-09 12:56 -0600
      Re: py2exe and 64/32 bit windows Grant Edwards <invalid@invalid.invalid> - 2013-04-09 19:45 +0000
        Re: py2exe and 64/32 bit windows Ian Kelly <ian.g.kelly@gmail.com> - 2013-04-09 14:01 -0600
        Re: py2exe and 64/32 bit windows Benjamin Kaplan <benjamin.kaplan@case.edu> - 2013-04-09 13:05 -0700

#43214 — py2exe and 64/32 bit windows

FromGrant Edwards <invalid@invalid.invalid>
Date2013-04-09 18:17 +0000
Subjectpy2exe and 64/32 bit windows
Message-ID<kk1m0b$i9i$1@reader1.panix.com>
Disclaimer: I'm a Unix guy and have been since the days of V7 on a
PDP-11 -- I rarely use MS Windows.

While I don't normally use Windows, I do occasionally have Python
applications (written under Linux) which I'd like to distribute to
Windows users. I've always used py2exe and Inno Setup to that, and
it's always worked OK (after a fair bit of stumbling around).

My "Windows partition" currently has a 64-bit Windows 7 Ultimate
installation.

I'm told that the executable I generate on that machine won't run on
Win7 32-bit installations.  I'm not surprised by that, but I'd like to
provide 32-bit operability -- and I'm not sure how one does that.

 * If I built an executable on a 32-bit windows system using py2exe,
   would it be usable on a 64-bit install?

 * Is there such a thing as a "fat" Windows binary that will run on
   both 32 and 64 bit systems?

 * Or do you build separate 32 and 64 bit binaries and rely on the
   installer to pick the right files?  [If Inno Setup can't do that, I
   can probably get somebody else to build the installer using
   something that can.] 

Or do I just wait until MS includs Python/tkinger/wxPython as part of
every Windows install?

-- 
Grant Edwards               grant.b.edwards        Yow! Are we live or on
                                  at               tape?
                              gmail.com            

                              
P.S. Don't tell anybody I can actually write programs that will run
     under MS Windows -- it's a secret.
                              

[toc] | [next] | [standalone]


#43215

FromIan Kelly <ian.g.kelly@gmail.com>
Date2013-04-09 12:56 -0600
Message-ID<mailman.377.1365533838.3114.python-list@python.org>
In reply to#43214
On Tue, Apr 9, 2013 at 12:17 PM, Grant Edwards <invalid@invalid.invalid> wrote:
> Disclaimer: I'm a Unix guy and have been since the days of V7 on a
> PDP-11 -- I rarely use MS Windows.
>
> While I don't normally use Windows, I do occasionally have Python
> applications (written under Linux) which I'd like to distribute to
> Windows users. I've always used py2exe and Inno Setup to that, and
> it's always worked OK (after a fair bit of stumbling around).
>
> My "Windows partition" currently has a 64-bit Windows 7 Ultimate
> installation.
>
> I'm told that the executable I generate on that machine won't run on
> Win7 32-bit installations.  I'm not surprised by that, but I'd like to
> provide 32-bit operability -- and I'm not sure how one does that.
>
>  * If I built an executable on a 32-bit windows system using py2exe,
>    would it be usable on a 64-bit install?

Yes, 64-bit Windows systems will run 32-bit executables.

>  * Is there such a thing as a "fat" Windows binary that will run on
>    both 32 and 64 bit systems?

With .NET applications you can choose an AnyCPU build target that will
dynamically select 32-bit or 64-bit at runtime based on the host OS,
but there is no such feature for native applications like CPython.

>  * Or do you build separate 32 and 64 bit binaries and rely on the
>    installer to pick the right files?  [If Inno Setup can't do that, I
>    can probably get somebody else to build the installer using
>    something that can.]

You could do that.  The easiest thing to do though is just to make
sure that your 64-bit Windows installation is using a 32-bit Python
installation.  py2exe doesn't really build anything; it just bundles
your source files up with the Python interpreter, so as long as that
interpreter is 32-bit the generated exes should be able to run on
either platform.

[toc] | [prev] | [next] | [standalone]


#43221

FromGrant Edwards <invalid@invalid.invalid>
Date2013-04-09 19:45 +0000
Message-ID<kk1r43$qgc$1@reader1.panix.com>
In reply to#43215
On 2013-04-09, Ian Kelly <ian.g.kelly@gmail.com> wrote:

>> My "Windows partition" currently has a 64-bit Windows 7 Ultimate
>> installation.
>>
>> I'm told that the executable I generate on that machine won't run on
>> Win7 32-bit installations.  I'm not surprised by that, but I'd like
>> to provide 32-bit operability -- and I'm not sure how one does that.
>>
>>  * If I built an executable on a 32-bit windows system using py2exe,
>>    would it be usable on a 64-bit install?
>
> Yes, 64-bit Windows systems will run 32-bit executables.

OK, that's good to know.

>>  * Is there such a thing as a "fat" Windows binary that will run on
>>    both 32 and 64 bit systems?
>
> With .NET applications you can choose an AnyCPU build target that
> will dynamically select 32-bit or 64-bit at runtime based on the host
> OS, but there is no such feature for native applications like
> CPython.
>
>>  * Or do you build separate 32 and 64 bit binaries and rely on the
>>    installer to pick the right files?  [If Inno Setup can't do that, I
>>    can probably get somebody else to build the installer using
>>    something that can.]
>
> You could do that.  The easiest thing to do though is just to make
> sure that your 64-bit Windows installation is using a 32-bit Python
> installation.  py2exe doesn't really build anything; it just bundles
> your source files up with the Python interpreter, so as long as that
> interpreter is 32-bit the generated exes should be able to run on
> either platform.

Cool, I'll try that.

Are there any drawbacks to running a 32-bit Python install on a 64-bit
machine?

Can you have both 32 and 64 bit Python installed at the same time?

-- 
Grant Edwards               grant.b.edwards        Yow! Is it clean in other
                                  at               dimensions?
                              gmail.com            

[toc] | [prev] | [next] | [standalone]


#43222

FromIan Kelly <ian.g.kelly@gmail.com>
Date2013-04-09 14:01 -0600
Message-ID<mailman.382.1365537755.3114.python-list@python.org>
In reply to#43221
On Tue, Apr 9, 2013 at 1:45 PM, Grant Edwards <invalid@invalid.invalid> wrote:
> Are there any drawbacks to running a 32-bit Python install on a 64-bit
> machine?

Apart from still being limited to a 2-GB address space, nothing that
I'm aware of.

> Can you have both 32 and 64 bit Python installed at the same time?

Absolutely.

[toc] | [prev] | [next] | [standalone]


#43224

FromBenjamin Kaplan <benjamin.kaplan@case.edu>
Date2013-04-09 13:05 -0700
Message-ID<mailman.384.1365537963.3114.python-list@python.org>
In reply to#43221

[Multipart message — attachments visible in raw view] — view raw

On Apr 9, 2013 12:53 PM, "Grant Edwards" <invalid@invalid.invalid> wrote:
>
> On 2013-04-09, Ian Kelly <ian.g.kelly@gmail.com> wrote:
>
> >> My "Windows partition" currently has a 64-bit Windows 7 Ultimate
> >> installation.
> >>
> >> I'm told that the executable I generate on that machine won't run on
> >> Win7 32-bit installations.  I'm not surprised by that, but I'd like
> >> to provide 32-bit operability -- and I'm not sure how one does that.
> >>
> >>  * If I built an executable on a 32-bit windows system using py2exe,
> >>    would it be usable on a 64-bit install?
> >
> > Yes, 64-bit Windows systems will run 32-bit executables.
>
> OK, that's good to know.
>
> >>  * Is there such a thing as a "fat" Windows binary that will run on
> >>    both 32 and 64 bit systems?
> >
> > With .NET applications you can choose an AnyCPU build target that
> > will dynamically select 32-bit or 64-bit at runtime based on the host
> > OS, but there is no such feature for native applications like
> > CPython.
> >
> >>  * Or do you build separate 32 and 64 bit binaries and rely on the
> >>    installer to pick the right files?  [If Inno Setup can't do that, I
> >>    can probably get somebody else to build the installer using
> >>    something that can.]
> >
> > You could do that.  The easiest thing to do though is just to make
> > sure that your 64-bit Windows installation is using a 32-bit Python
> > installation.  py2exe doesn't really build anything; it just bundles
> > your source files up with the Python interpreter, so as long as that
> > interpreter is 32-bit the generated exes should be able to run on
> > either platform.
>
> Cool, I'll try that.
>
> Are there any drawbacks to running a 32-bit Python install on a 64-bit
> machine?
>
> Can you have both 32 and 64 bit Python installed at the same time?
>
> --
> Grant Edwards               grant.b.edwards        Yow! Is it clean in
other
>                                   at               dimensions?
>                               gmail.com
> --

There aren't any drawbacks besides the usual 32-bit limitations (the memory
limit and you can't load 64-bit libs from a 32-bit exe). You can run both
32-bit and 64-bit python side by side.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web