简体   繁体   English

cx_Freeze setup.py运行不会生成任何内容

[英]cx_Freeze setup.py run does not build anything

I just try to make an exe with cx_Freeze. 我只是尝试用cx_Freeze创建一个exe。

I use the command: path\\python37.exe path\\setup.py build 我使用以下命令: path\\python37.exe path\\setup.py build

I got many lines in the CLI ( I write a part, but not all, I copied some of them down, I removed the ones that looked alike ) but no errors, and i got no build created . 我在CLI中有很多行( 我写了一部分,但不是全部,我复制了其中的一部分,删除了看起来相似的那些 ),但是没有错误, 也没有创建任何构建

This is my setup.py file: 这是我的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],

)

Any help would be welcome :) 任何帮助都将受到欢迎:)

The command line displays: 命令行显示:

     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
'

Try to put your setup.py in the same directory than ScriptTabStats.py , modify the exe line as 尝试将setup.pyScriptTabStats.py放在同一目录中,将exe行修改为

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

and run the command as 并运行命令为

path_to/python37.exe setup.py build

from this same directory. 从同一目录。

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

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