[英]Python cx_Freeze - One Executable file does not open the other?
[英]Executable file generated from cx_Freeze not running on other computers
我已使用以下“ setup.py”文件將python文件轉換為可執行文件。 在“ build”目錄中生成的可執行文件可以在我的筆記本電腦上完美執行,但根本不能在我哥哥的筆記本電腦上運行(我使用cx_Freeze來做到這一點)。 我的筆記本電腦和我的兄弟完全一樣。 唯一的區別是:我安裝了Python 3.4.4(以及Pygame),但他沒有安裝,而我有Windows 8,而他有Windows10。我找不到問題。 是因為“ cx_Freeze”嗎? 是因為我有Python而他沒有嗎? 當然,可執行文件應該可以在任何Windows計算機上運行...下面是我的“ setup.py”文件。
from cx_Freeze import setup, Executable
setup(
name = "Pythongame",
version = "1.0",
description = "Game made with Pygame",
executables = [Executable("Pythongame.py", base="Win32GUI")],
)
任何幫助是極大的贊賞!
注意:我需要base =“ Win32GUI”作為pygame創建一個GUI
是的,您需要復制所有目錄(例如build),因為他包含庫(dll和其他庫)
或僅為您的Windows(win7 64bit)生成此exe
我建議你使用Pyinstaller
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.