D:\python_test>pip3 install pyinstaller…………D:\python_test>pyinstaller -F -w ui.py84 INFO: PyInstaller: 3.3.185 INFO: Python: 3.6.488 INFO: Platform: Windows-10-10.0.15063-SP093 INFO: wrote D:\python_test\ui.spec94 INFO: UPX is not available.97 INFO: Extending PYTHONPATH with paths['D:\\python_test']101 INFO: checking Analysis178 INFO: checking PYZ191 INFO: checking PKG246 INFO: Bootloader d:\python\lib\site-packages\PyInstaller\bootloader\Windows-64bit\runw.exe246 INFO: checking EXE260 INFO: Building because console changed260 INFO: Building EXE from out00-EXE.toc267 INFO: Appending archive to EXE D:\python_test\dist\ui.exe284 INFO: Building EXE from out00-EXE.toc completed successfully. pyinstaller -F -w ui.py,如果不加参数-w,则生成的exe文件在执行时,会默认打开控制台。
转载于:https://www.cnblogs.com/BH8ANK/p/10792675.html