1

私はpython 64ビット、wxpython 64ビット、py2exe 64ビットを使用していることを確認しました。また、py2exeを使用して、あなたの助けが必要なsetup.pyを使用して、単純な印刷「hello」コードをexeにコンパイルしています。パイは次のように見えます

#!/usr/bin/python

from distutils.core import setup
import py2exe

manifest = """
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
manifestVersion="1.0">
<assemblyIdentity
    version="0.64.1.0"
    processorArchitecture="x86"
    name="Controls"
    type="win32"
/>
<description>Your Application</description>
<dependency>
    <dependentAssembly>
        <assemblyIdentity
            type="win32"
            name="Microsoft.Windows.Common-Controls"
            version="6.0.0.0"
            processorArchitecture="*"
            publicKeyToken="6595b64144ccf1df"
            language="*"
        />
    </dependentAssembly>
</dependency>
</assembly>
"""

"""
installs manifest and icon into the .exe
but icon is still needed as we open it
for the window icon (not just the .exe)
changelog and logo are included in dist
"""

setup(
    windows = [
        {
            "script": "module2.py",
            "icon_resources": [(1, "logo.ico")],
            "other_resources": [(24,1,manifest)]
        }
    ],
      data_files=["logo.ico"]
)

生成されたexeをコンパイルして実行すると、

---------------------------
Microsoft Visual C++ Runtime Library
---------------------------
Runtime Error!

Program: C:\User...

R6034

An application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information.


---------------------------
OK   
---------------------------

SOで同様の問題を検索して見つけましたが、ほとんどのユーザーが32ビットマシンを使用しているのに対し、私のマシンは64ビットexeにコンパイルしたい64ビットマシンであるため、問題を解決するものはありません。py2exe が 64 ビットであることを確認しましたが、py2exe サンプルでも 64 ビット用のマニフェスト ファイルが見つかりません (py2exe 64 ビット パッケージには 32 ビット マニフェスト サンプルが含まれています)。

py2exe 64 ビットの正しいマニフェストを指定して 64 ビット exe にコンパイルするにはどうすればよいですか

4

0 に答える 0