pip install pyinstaller
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: 'd:\工具\python-3.8.5\python.exe' 'd:\工具\python-3.8.5\lib\site-p
ackages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\
Users\ADMINI~1\AppData\Local\Temp\tmpt9scrcvi'
cwd: C:\Users\Administrator\AppData\Local\Temp\pip-install-fsolh6xo\pyi
nstaller
Complete output (38 lines):
running dist_info
creating C:\Users\Administrator\AppData\Local\Temp\pip-modern-metadata-r3kaa
i3n\pyinstaller.egg-info
writing C:\Users\Administrator\AppData\Local\Temp\pip-modern-metadata-r3kaai
3n\pyinstaller.egg-info\PKG-INFO
writing dependency_links to C:\Users\Administrator\AppData\Local\Temp\pip-mo
dern-metadata-r3kaai3n\pyinstaller.egg-info\dependency_links.txt
writing entry points to C:\Users\Administrator\AppData\Local\Temp\pip-modern
-metadata-r3kaai3n\pyinstaller.egg-info\entry_points.txt
writing requirements to C:\Users\Administrator\AppData\Local\Temp\pip-modern
-metadata-r3kaai3n\pyinstaller.egg-info\requires.txt
writing top-level names to C:\Users\Administrator\AppData\Local\Temp\pip-mod
ern-metadata-r3kaai3n\pyinstaller.egg-info\top_level.txt
writing manifest file 'C:\Users\Administrator\AppData\Local\Temp\pip-modern-
metadata-r3kaai3n\pyinstaller.egg-info\SOURCES.txt'
reading manifest file 'C:\Users\Administrator\AppData\Local\Temp\pip-modern-
metadata-r3kaai3n\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 positio
n 0: invalid start byte (sitecustomize.py, line 7)
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'
warning: no previously-included files matching '*.py[co]' found anywhere in
distribution
writing manifest file 'C:\Users\Administrator\AppData\Local\Temp\pip-modern-
metadata-r3kaai3n\pyinstaller.egg-info\SOURCES.txt'
creating 'C:\Users\Administrator\AppData\Local\Temp\pip-modern-metadata-r3ka
ai3n\pyinstaller.dist-info'
error: invalid command 'bdist_wheel' ---------------------->猜测这句出错
----------------------------------------
ERROR: Command errored out with exit status 1: 'd:\工具\python-3.8.5\python.exe'
'd:\工具\python-3.8.5\lib\site-packages\pip\_vendor\pep517\_in_process.py' prep
are_metadata_for_build_wheel 'C:\Users\ADMINI~1\AppData\Local\Temp\tmpt9scrcvi'
Check the logs for full command output.
发现果然出错....
python
查看自己python版本
按照网上办法 pip install PyAudio-0.2.11-cp38-cp38-win_amd64.whl
http://www.pyinstaller.org/downloads.html (对应下载地址)
---->>>>依旧安装失败
换PyAudio-0.2.11-cp38-cp38-win_amd32.whl 安装成功,但是pyinstaller依旧安装失败.
分析猜想直接安装wheel 看是否能做个乖孩子自行匹配:
pip install wheel
再次安装果然成功了,对py文件进行打包:
pyinstaller -F py文件路径
C:\Users\Administrator\dist\mzitu.exe 即为打包成功所在路径.
成功!!!可行. 希望对大家有所帮助.