Python關於安裝Pyinstaller模塊 有中文路徑報錯的問題ERROR: Command errored out with exit status


近期安裝Pyinstaller打包模塊過程中出現以下報錯

ERROR: Command errored out with exit status 1: command: 'g:\python\python.exe' 'g:\python\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\北\AppData\Local\Temp\tmp
xyxk9e6j'          cwd: C:\Users\北\AppData\Local\Temp\pip-install-az1k255r\pyinstaller Complete output (36 lines): running dist_info creating C:\Users\北\AppData\Local\Temp\pip-modern-metadata-7jpk6a3j\PyInstaller.egg-info writing C:\Users\北\AppData\Local\Temp\pip-modern-metadata-7jpk6a3j\PyInstaller.egg-info\PKG-INFO writing dependency_links to C:\Users\北\AppData\Local\Temp\pip-modern-metadata-7jpk6a3j\PyInstaller.egg-info\dependency_links.txt writing entry points to C:\Users\北\AppData\Local\Temp\pip-modern-metadata-7jpk6a3j\PyInstaller.egg-info\entry_points.txt writing requirements to C:\Users\北\AppData\Local\Temp\pip-modern-metadata-7jpk6a3j\PyInstaller.egg-info\requires.txt writing top-level names to C:\Users\北\AppData\Local\Temp\pip-modern-metadata-7jpk6a3j\PyInstaller.egg-info\top_level.txt writing manifest file 'C:\Users\北\AppData\Local\Temp\pip-modern-metadata-7jpk6a3j\PyInstaller.egg-info\SOURCES.txt' reading manifest file 'C:\Users\北\AppData\Local\Temp\pip-modern-metadata-7jpk6a3j\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 0xb1 in position 0: invalid start byte (sitecustomize.py, line 21)
    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\北\AppData\Local\Temp\pip-modern-metadata-7jpk6a3j\PyInstaller.egg-info\SOURCES.txt' creating 'C:\Users\北\AppData\Local\Temp\pip-modern-metadata-7jpk6a3j\PyInstaller.dist-info' error: invalid command 'bdist_wheel'
    ---------------------------------------- ERROR: Command errored out with exit status 1: 'g:\python\python.exe' 'g:\python\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C
:\Users\北\AppData\Local\Temp\tmpxyxk9e6j' Check the logs for full command output.

解決方式如下:

由於缺少wheel文件 執行此命令

pip install wheel -i https://pypi.tuna.tsinghua.edu.cn/simple

而后執行

pip install pyinstaller

即可完成安裝如下圖所示

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM