我无法安装 PyInstaller , Preparing wheel metadata ... 错误

问题描述

我正在使用 Python 3.9.1(2020 年 12 月 31 日,从 Microsoft Store 下载)并且我想将我的一个项目转换为可执行文件,但每次我尝试 pip install pyinstaller 时,它都会这样说(我一开始就删掉了一些代码,因为除了没有错误之外,stackoverflow 说我的帖子主要是代码):

  Getting requirements to build wheel ... done
    Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
 command: 'C:\Users\Γιώργος Βέβας\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' 'C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.496.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\37A0~1\AppData\Local\Temp\tmpwurr1dm8'
     cwd: C:\Users\Γιώργος Βέβας\AppData\Local\Temp\pip-req-build-gbhcr_je
Complete output (34 lines):
Error in sitecustomize; set PYTHONVERBOSE for traceback:
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xc3 in position 0: invalid continuation byte (sitecustomize.py,line 21)
running dist_info
creating C:\Users\Γιώργος Βέβας\AppData\Local\Temp\pip-modern-metadata-61iwlidj\pyinstaller.egg-info
writing C:\Users\Γιώργος Βέβας\AppData\Local\Temp\pip-modern-metadata-61iwlidj\pyinstaller.egg-info\PKG-INFO
writing dependency_links to C:\Users\Γιώργος Βέβας\AppData\Local\Temp\pip-modern-metadata-61iwlidj\pyinstaller.egg-info\dependency_links.txt
writing entry points to C:\Users\Γιώργος Βέβας\AppData\Local\Temp\pip-modern-metadata-61iwlidj\pyinstaller.egg-info\entry_points.txt
writing requirements to C:\Users\Γιώργος Βέβας\AppData\Local\Temp\pip-modern-metadata-61iwlidj\pyinstaller.egg-info\requires.txt
writing top-level names to C:\Users\Γιώργος Βέβας\AppData\Local\Temp\pip-modern-metadata-61iwlidj\pyinstaller.egg-info\top_level.txt
writing manifest file 'C:\Users\Γιώργος Βέβας\AppData\Local\Temp\pip-modern-metadata-61iwlidj\pyinstaller.egg-info\SOURCES.txt'
reading manifest file 'C:\Users\Γιώργος Βέβας\AppData\Local\Temp\pip-modern-metadata-61iwlidj\pyinstaller.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
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'
no previously-included directories found matching 'old'
no previously-included directories found matching '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\Γιώργος Βέβας\AppData\Local\Temp\pip-modern-metadata-61iwlidj\pyinstaller.egg-info\SOURCES.txt'
creating 'C:\Users\Γιώργος Βέβας\AppData\Local\Temp\pip-modern-metadata-61iwlidj\pyinstaller.dist-info'
error: invalid command 'bdist_wheel'
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\Γιώργος Βέβας\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\python.exe' 'C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.496.0_x64__qbz5n2kfra8p0\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\37A0~1\AppData\Local\Temp\tmpwurr1dm8' Check the logs for full command output.

当我 pip install wheel 时,它说:

     Requirement already satisfied: wheel in c:\users\γιώργος 
βέβας\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local- 
packages\python39\site-packages (0.36.2)

当我升级 pip 时也出现了:

 WARNING: The scripts pip.exe,pip3.9.exe and pip3.exe are installed in 'C:\Users\Γιώργος Βέβας\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH.

考虑将此目录添加到 PATH,或者,如果您希望取消此警告,请使用 --no-warn-script-location。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)