Can I control the architecture (32bit vs 64bit) when building a pyinstaller executable?

前端 未结 2 1740
悲哀的现实
悲哀的现实 2020-12-14 06:21

Short Question
Is there any way to control / guarantee the architecture (32bit vs 64bit) when building a pyinstaller executable?

Backg

2条回答
  •  既然无缘
    2020-12-14 07:02

    If you are building an application and it runs fine on 32-bit Windows, there is no need to create a 64-bit version. Just create a 32-bit version and run it on both architectures. What is what WOW64 is for.

    If you need to use a library or feature which is 64-bit only, just build a 64-bit version. There is no point in building a 32-bit version if the feature is 64-bit only.

    The only reason to build a 64-bit and 32-bit version both, is to take advantage of increased address space of 64-bit windows. I.e. if you intend to allocate more than 1 or 2 GB of memory. An example might be an image editing application, or a data manipulation application. Then you can run on 32-bit platforms within the constraints of the platform but edit larger images or larger quantities of data on 64-bit platforms.

    IOW, for your case follow the suggestion of @Velociraptors and build in 32-bit python if you are building a 32-bit exe.

提交回复
热议问题