buaa21 / summer2020

软件学院《程序设计实践》2020小学期仓库
40 stars 8 forks source link

怎么将多个py文件打包成一个exe文件 #223

Closed dwb2001 closed 3 years ago

dwb2001 commented 3 years ago
请问exe怎么打包?而且pyinstaller好像也装不了。。
PineZhuo commented 3 years ago

pyinstaller为什么装不了呢?报错是什么,打包成exe一般都得用pyinstaller

Withinlover commented 3 years ago

是网速问题嘛...

可以复制这个用cmd / PowerShell 运行

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pyinstaller
dwb2001 commented 3 years ago

报错是 command errored out with exist status 1:然后下面一堆红字

dwb2001 commented 3 years ago

ERROR: Command errored out with exit status 1: command: 'd:\python\python.exe' 'd:\python\lib\site-packages\pip_vendor\pep517_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\gr\AppData\Local\Temp\tmpj_wi1c9e' cwd: C:\Users\gr\AppData\Local\Temp\pip-install-burhsnk5\pyinstaller Complete output (37 lines): running dist_info creating C:\Users\gr\AppData\Local\Temp\pip-modern-metadata-agb2bsk1\pyinstaller.egg-info writing C:\Users\gr\AppData\Local\Temp\pip-modern-metadata-agb2bsk1\pyinstaller.egg-info\PKG-INFO writing dependency_links to C:\Users\gr\AppData\Local\Temp\pip-modern-metadata-agb2bsk1\pyinstaller.egg-info\dependency_links.txt writing entry points to C:\Users\gr\AppData\Local\Temp\pip-modern-metadata-agb2bsk1\pyinstaller.egg-info\entry_points.txt writing requirements to C:\Users\gr\AppData\Local\Temp\pip-modern-metadata-agb2bsk1\pyinstaller.egg-info\requires.txt writing top-level names to C:\Users\gr\AppData\Local\Temp\pip-modern-metadata-agb2bsk1\pyinstaller.egg-info\top_level.txt writing manifest file 'C:\Users\gr\AppData\Local\Temp\pip-modern-metadata-agb2bsk1\pyinstaller.egg-info\SOURCES.txt' reading manifest file 'C:\Users\gr\AppData\Local\Temp\pip-modern-metadata-agb2bsk1\pyinstaller.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' Error in sitecustomize; set PYTHONVERBOSE for traceback: SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xb9 in position 0: invalid start byte (sitecustomize.py, line 21) warning: no files found matching 'pyinstaller-gui.py' no previously-included directories found matching 'bootloader\build' no previously-included directories found matching 'bootloader.waf-' no previously-included directories found matching 'bootloader.waf3-' no previously-included directories found matching 'bootloader\waf-' no previously-included directories found matching 'bootloader\waf3-' no previously-included directories found matching 'bootloader_sdks' no previously-included directories found matching 'bootloader.vagrant' warning: no previously-included files found matching 'bootloader.lock-waf' no previously-included directories found matching 'doc\source' no previously-included directories found matching 'doc_build' warning: no previously-included files matching '.tmp' found under directory 'doc' warning: no files found matching 'news_template.rst' no previously-included directories found matching 'news' no previously-included directories found matching 'old' no previously-included directories found matching 'scripts' no previously-included directories found matching 'tests\scripts' no previously-included directories found matching '.github' warning: no previously-included files found matching '.' warning: no previously-included files found matching '.yml' warning: no previously-included files found matching '*~' warning: no previously-included files found matching '.directory' writing manifest file 'C:\Users\gr\AppData\Local\Temp\pip-modern-metadata-agb2bsk1\pyinstaller.egg-info\SOURCES.txt' creating 'C:\Users\gr\AppData\Local\Temp\pip-modern-metadata-agb2bsk1\pyinstaller.dist-info' error: invalid command 'bdist_wheel'

ERROR: Command errored out with exit status 1: 'd:\python\python.exe' 'd:\python\lib\site-packages\pip_vendor\pep517_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\gr\AppData\Local\Temp\tmpj_wi1c9e' Check the logs for full command output.

PineZhuo commented 3 years ago

试试pip install wheel