简体   繁体   中英

cx_Freeze setup.py run does not build anything

I just try to make an exe with cx_Freeze.

I use the command: 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 .

This is my setup.py file:

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

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

and run the command as

path_to/python37.exe setup.py build

from this same directory.

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