Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/352.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 使用cx freeze将.py转换为windows可执行文件_Python_Python 3.x_Cx Freeze - Fatal编程技术网

Python 使用cx freeze将.py转换为windows可执行文件

Python 使用cx freeze将.py转换为windows可执行文件,python,python-3.x,cx-freeze,Python,Python 3.x,Cx Freeze,当我尝试将.py转换为windows可执行文件时,会出现这种类型的错误 警告:无法读取注册表以找到必要的编译器设置 确保安装了Python模块winreg、win32api或win32con 错误:[Errno 2]没有这样的文件或目录:'/usr/lib/python3.4/distutils/command/wininst-6.0.exe',/usr/lib/python3.4/distutils/command/wininst-6.0.exe'未包含在Debian软件包中 import s

当我尝试将.py转换为windows可执行文件时,会出现这种类型的错误 警告:无法读取注册表以找到必要的编译器设置 确保安装了Python模块winreg、win32api或win32con 错误:[Errno 2]没有这样的文件或目录:'/usr/lib/python3.4/distutils/command/wininst-6.0.exe',/usr/lib/python3.4/distutils/command/wininst-6.0.exe'未包含在Debian软件包中

import sys
import os

from cx_Freeze import setup,Executable
def find_data_file(password_lst):
    if getattr(sys, 'frozen', False):
    datadir = os.path.dirname(sys.executable)
    else:

       datadir = os.path.dirname(__file__)

    return os.path.join(datadir, password_lst)
    base = None
    includes = ['password_lst']
    zip_inc = ['password_lst']
    build_exe_options = {"packages": ["os"], "include_files": includes, "zip_includes": zip_inc}

    setup(  name = "test",
    version = "0.1",
    description = "test",
    options = {"build_exe": build_exe_options},
    executables = [Executable("dummy.py" , base=base )])





   Warning: Can't read registry to find the necessary compiler setting
   Make sure that Python modules winreg, win32api or win32con are installed
   error: [Errno 2] No such file or directory:    '/usr/lib/python3.4/distutils/command/wininst-6.0.exe',    usr/lib/python3.4/distutils/command/wininst-6.0.exe not included in the Debian packages.

cx_Freeze不支持从Linux系统()生成Windows可执行文件。无耻插头:你可能对尝试感兴趣。我尝试过,但其他模块都不工作