Problem deploying Python program (packaged with py2exe)

前端 未结 4 1895
故里飘歌
故里飘歌 2021-01-07 09:26

I have a problem: I used py2exe for my program, and it worked on my computer. I packaged it with Inno Setup (still worked on my computer), but when I sent it to a different

4条回答
  •  伪装坚强ぢ
    2021-01-07 09:54

    You need to include msvcr90.dll, Microsoft.VC90.CRT.manifest, and python.exe.manifest (renamed to [yourappname].exe.manifest) in your install directory. These files will be in the Python26 directory on your system if you installed Python with the "Just for me" option.

    Instructions for doing this can be found here.

    Don't forget to call multiprocessing.freeze_support() in your main function also, or you will have problems when you start a new process.

    While others have discussed including the MSVC runtime in your install package, the above solution works when you only want to distribute a single .zip file containing all your files. It avoids having to create a separate install package when you don't want that additional complication.

提交回复
热议问题