简体   繁体   English

CX_Freeze:Python.exe 没有响应

[英]CX_Freeze: Python.exe not responding

I am trying to convert my text editor into an exe to sell it, but Windows says that python.exe is not responding when I try to convert it in cmd.我正在尝试将我的文本编辑器转换为 exe 以出售它,但是当我尝试在 cmd 中转换它时,Windows 说 python.exe 没有响应。

My file name is arshi.py.我的文件名为 arshi.py。

Below is my setup.py:下面是我的 setup.py:

import sys
from cx_Freeze import setup, Executable

base = None
if (sys.platform == "win32"):
    base = "Win32GUI"

exe = Executable(
        script = "arshi.py",
        icon = "icon.PNG",
        targetName = "Arshi.exe",
        base = base
        )

setup(
    name = "Arshi Editor",
    version = "0.1",
    description = "A lightweight text editor for Python",
    author = "Henry Zhu",
    options = {'build_exe': {"packages": ["pygments"]}},
    executables = [exe]
)

cx_freeze doesn't accept .png files, but rather only .ico files. cx_freeze 不接受.png文件,而只接受.ico文件。 Converting the .png file to an .ico file worked beautifully for me..png文件转换为.ico文件对我来说效果很好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM