【问题标题】:cx_Freeze setup.py run does not build anythingcx_Freeze setup.py run 不构建任何东西
【发布时间】:2019-11-29 20:53:28
【问题描述】:

我只是尝试用 cx_Freeze 制作一个 exe。

我使用命令:path\python37.exe path\setup.py build

我在 CLI 中有很多行(我写了一部分,但不是全部,我复制了其中一些,删除了看起来相似的行)但没有错误,并且我没有创建任何版本

这是我的setup.py 文件:

from cx_Freeze import setup, Executable

base = "Win32GUI" # This lets the exe run without the console popping up

exe = Executable("C:\\Users\\Charly\\CloudStation\\Projets\\Perso\\Tab_Stat_Employes\\LogiquePython\\ScriptTabStats.py",
                  targetName='ScriptTabStats.exe')

setup(
        name="ScriptTabStats",
        description = "Make calculations on xlsx file",        
        executables = [exe],

)

欢迎任何帮助:)

命令行显示:

     Name                      File
  ----                      ----
m BUILD_CONSTANTS
m __future__                C:\Users\Charly\AppData\Local\Programs\Python\Python37\lib\_bootlocale.py
m _bz2                      C:\Users\Charly\AppData\Local\Programs\Python\Python37\DLLs\_bz2.pyd

m _functools
m _hashlib                  

m encodings.iso2022_jp_2    C:\Users\Charly\AppData\Local\Programs\Python\Python37\lib\encodings\iso2022_jp_2.py
m encodings.iso2022_jp_2004 


Missing modules:
? __main__ imported from bdb, pdb
? _frozen_importlib imported from importlib, importlib.abc
? _frozen_importlib_external imported from importlib, importlib._bootstrap, importlib.abc
? _posixsubprocess imported from subprocess
? _winreg imported from platform
? grp imported from shutil, tarfile
? java.lang imported from platform
? org.python.core imported from copy, pickle
? os.path imported from os, pkgutil, py_compile, tracemalloc, unittest, unittest.util
? posix imported from os
? pwd imported from http.server, posixpath, shutil, tarfile, webbrowser
? termios imported from tty
? vms_lib imported from platform
This is not necessarily a problem - the modules may not be needed on this platform.

copying C:\Users\Charly\AppData\Local\Programs\Python\Python37\DLLs\pyexpat.pyd -> build\exe.win-amd64-3.7\lib\pyexpat.pyd> build\exe.win-amd64-3.7\lib\select.pyd
'

【问题讨论】:

    标签: python build cx-freeze


    【解决方案1】:

    尽量把你的setup.pyScriptTabStats.py放在同一目录下,修改exe行为

    exe = Executable("ScriptTabStats.py", targetName='ScriptTabStats.exe')
    

    并以

    的身份运行命令
    path_to/python37.exe setup.py build
    

    来自同一个目录。

    【讨论】:

    • 感谢您花时间回答我,但我使用“PyInstaller”制作 ma exe...我尝试使用 Windows 工具卸载 cx_Freeze,但他只卸载了部分...所以不可能重新安装它。厌倦了与 cx_freeze 的斗争,我改变了编译工具。我应该对这篇文章做些什么吗?
    猜你喜欢
    • 2011-06-10
    • 2012-10-18
    • 1970-01-01
    • 2016-04-27
    • 2011-12-26
    • 2019-03-08
    • 2017-12-09
    • 1970-01-01
    • 2014-12-02
    相关资源
    最近更新 更多