Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'received:209.85.223': 0.03; 'interpreter': 0.05; '64-bit': 0.07; 'binary': 0.07; 'dynamically': 0.07; '32-bit': 0.09; 'executable': 0.09; 'runtime': 0.09; 'python': 0.11; 'windows': 0.15; '>>': 0.16; 'interpreter,': 0.16; 'machine?': 0.16; 'side.': 0.16; 'subject:bit': 0.16; 'subject:windows': 0.16; 'to:name:python list': 0.16; 'usable': 0.16; 'win7': 0.16; "\xc2\xa0i'm": 0.16; 'wrote:': 0.18; 'bit': 0.19; '(the': 0.22; 'machine': 0.22; 'memory': 0.22; 'select': 0.22; 'email addr:gmail.com>': 0.22; 'separate': 0.22; 'install': 0.23; 'installation': 0.23; 'load': 0.23; "aren't": 0.24; 'source': 0.25; '>': 0.26; 'subject:/': 0.26; 'header:In-Reply-To:1': 0.27; 'installed': 0.27; 'host': 0.29; 'feature': 0.29; "doesn't": 0.30; 'besides': 0.30; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; 'that.': 0.31; 'cool,': 0.31; 'os,': 0.31; 'probably': 0.32; 'know.': 0.32; 'run': 0.32; 'running': 0.33; "i'd": 0.34; 'could': 0.34; "can't": 0.35; 'received:209.85': 0.35; 'something': 0.35; 'usual': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'really': 0.36; 'limitations': 0.36; "i'll": 0.36; 'should': 0.36; 'received:209': 0.37; 'skip:& 10': 0.38; 'easiest': 0.38; 'somebody': 0.38; 'to:addr:python-list': 0.38; 'files': 0.38; 'pm,': 0.38; 'that,': 0.38; 'does': 0.39; 'sure': 0.39; 'to:addr:python.org': 0.39; 'either': 0.39; 'how': 0.40; 'ian': 0.60; 'such': 0.63; 'choose': 0.64; 'pick': 0.64; 'provide': 0.64; 'side': 0.67; 'limit': 0.70; 'installer': 0.84; 'edwards': 0.91; 'ultimate': 0.93; '2013': 0.98 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-received:in-reply-to:references:date :message-id:subject:from:to:content-type:x-gm-message-state; bh=Ulo61vocQ/gFOPelqg2QvlHFlEfZtyaZbe43fTMyef8=; b=P0zG8nIp/kby7BXCx9IGDQ8JVuuEsv4ZHARWgIsH8rAdb9qgD9ugLtqpVi5fBuoYdC 9tmgjc4O+OKuhfJJE9p49f3h7m/xIfwmnTSQqR0IvdTUPD4a8PcUrEw9TE1auZRXJhEp cJXv2d5xmD5SBihcW1rO6KK9x04AvTWvPQ1GVO8WErZW1zZ8OMGy4BqDyzqv+/8Ito29 Z4ScBrsJ3DAIjDdGsG30M/YnCWGfx9sug2y7ZkG8R/26YLA8+BbvJ2yt1Mxz5jfPRlpt 6YvIIm2m00SmWSncC1HmZLCHwRXZybzO05f9lUhta8OZnCv+NRQfAFeeEm11Zz9us6C3 r5rA== X-Received: by 10.182.204.5 with SMTP id ku5mr19505418obc.22.1365537954035; Tue, 09 Apr 2013 13:05:54 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.182.204.5 with SMTP id ku5mr19505412obc.22.1365537953939; Tue, 09 Apr 2013 13:05:53 -0700 (PDT) In-Reply-To: References: Date: Tue, 9 Apr 2013 13:05:53 -0700 Subject: Re: py2exe and 64/32 bit windows From: Benjamin Kaplan To: Python List Content-Type: multipart/alternative; boundary=e89a8ff1cd3eac0ee004d9f314a9 X-Gm-Message-State: ALoCoQmvfE4uwAEAddNBnWuIrYHJd63daG2CJfsJmWlGe1HgTEjRPELVMauO0edx0ffSUW5QDJ2x2RkXYxCBcW0XBzt55itySv6+EmrUdL/CK64kkq7q83mSrG9sIpNkGl9nt1PBIbEvzsn5DkqKWjh2F3Z6Eje/rQ== X-Junkmail-Whitelist: YES (by domain whitelist at mpv2.tis.cwru.edu) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 145 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1365537963 news.xs4all.nl 2676 [2001:888:2000:d::a6]:33722 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:43224 --e89a8ff1cd3eac0ee004d9f314a9 Content-Type: text/plain; charset=UTF-8 On Apr 9, 2013 12:53 PM, "Grant Edwards" wrote: > > On 2013-04-09, Ian Kelly 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. --e89a8ff1cd3eac0ee004d9f314a9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Apr 9, 2013 12:53 PM, "Grant Edwards" <invalid@invalid.inva= lid> wrote:
>
> On 2013-04-09, Ian Kelly <= ian.g.kelly@gmail.com> wrote:
>
> >> My "Windows partition" currently has a 64-bit Windo= ws 7 Ultimate
> >> installation.
> >>
> >> I'm told that the executable I generate on that machine w= on't run on
> >> Win7 32-bit installations. =C2=A0I'm not surprised by tha= t, but I'd like
> >> to provide 32-bit operability -- and I'm not sure how one= does that.
> >>
> >> =C2=A0* If I built an executable on a 32-bit windows system u= sing py2exe,
> >> =C2=A0 =C2=A0would it be usable on a 64-bit install?
> >
> > Yes, 64-bit Windows systems will run 32-bit executables.
>
> OK, that's good to know.
>
> >> =C2=A0* Is there such a thing as a "fat" Windows bi= nary that will run on
> >> =C2=A0 =C2=A0both 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.
> >
> >> =C2=A0* Or do you build separate 32 and 64 bit binaries and r= ely on the
> >> =C2=A0 =C2=A0installer to pick the right files? =C2=A0[If Inn= o Setup can't do that, I
> >> =C2=A0 =C2=A0can probably get somebody else to build the inst= aller using
> >> =C2=A0 =C2=A0something that can.]
> >
> > You could do that. =C2=A0The easiest thing to do though is just t= o make
> > sure that your 64-bit Windows installation is using a 32-bit Pyth= on
> > installation. =C2=A0py2exe doesn't really build anything; it = just bundles
> > your source files up with the Python interpreter, so as long as t= hat
> > 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 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 grant.b= .edwards =C2=A0 =C2=A0 =C2=A0 =C2=A0Yow! Is it clean in other
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 at =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 dimensions?
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 gmail.com
> --

There aren't any drawbacks besides the usual 32-bit limi= tations (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.

--e89a8ff1cd3eac0ee004d9f314a9--