简体   繁体   中英

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.

My file name is arshi.py.

Below is my 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. Converting the .png file to an .ico file worked beautifully for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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