当我尝试安装 pyinstaller 时,如何修复控制台中的错误退出 1 状态?

问题描述

我在使用 Python 时遇到问题。我已经尝试在控制台中安装“pyinstaller” 2 天了。不幸的是,我总是得到错误退出 1 状态。我已经将我的版本从 3.9 更改为 3.8,然后更改为 3.7。不幸的是,这没有帮助。我还尝试安装另一个模块。同样,这没有帮助。这是我从控制台得到的(我用“user.example”替换了我的真实姓名):

C:\Users\user.example>pip install pyinstaller
Collecting pyinstaller
  Using cached pyinstaller-4.1.tar.gz (3.5 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel Metadata ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\user.example\appdata\local\programs\python\python37\python.exe' 'c:\users\user.example\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_Metadata_for_build_wheel 'C:\Users\USER.EXAMPLE\AppData\Local\Temp\tmp_ccgduda'
         cwd: C:\Users\USER.EXAMPLE\AppData\Local\Temp\pip-install-rxa3pb6o\pyinstaller_a5809cbec58c4c85bcccefa73b853d2b
    Complete output (38 lines):
    running dist_info
    creating C:\Users\USER.EXAMPLE\AppData\Local\Temp\pip-modern-Metadata-ro_gztrg\pyinstaller.egg-info
    writing C:\Users\USER.EXAMPLE\AppData\Local\Temp\pip-modern-Metadata-ro_gztrg\pyinstaller.egg-info\PKG-INFO
    writing dependency_links to C:\Users\USER.EXAMPLE\AppData\Local\Temp\pip-modern-Metadata-ro_gztrg\pyinstaller.egg-info\dependency_links.txt
    writing entry points to C:\Users\USER.EXAMPLE\AppData\Local\Temp\pip-modern-Metadata-ro_gztrg\pyinstaller.egg-info\entry_points.txt
    writing requirements to C:\Users\USER.EXAMPLE\AppData\Local\Temp\pip-modern-Metadata-ro_gztrg\pyinstaller.egg-info\requires.txt
    writing top-level names to C:\Users\USER.EXAMPLE\AppData\Local\Temp\pip-modern-Metadata-ro_gztrg\pyinstaller.egg-info\top_level.txt
    writing manifest file 'C:\Users\USER.EXAMPLE\AppData\Local\Temp\pip-modern-Metadata-ro_gztrg\pyinstaller.egg-info\SOURCES.txt'
    reading manifest file 'C:\Users\USER.EXAMPLE\AppData\Local\Temp\pip-modern-Metadata-ro_gztrg\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 0xf6 in position 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\USER.EXAMPLE\AppData\Local\Temp\pip-modern-Metadata-ro_gztrg\pyinstaller.egg-info\SOURCES.txt'
    creating 'C:\Users\USER.EXAMPLE\AppData\Local\Temp\pip-modern-Metadata-ro_gztrg\pyinstaller.dist-info'
    error: invalid command 'bdist_wheel'
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\user.example\appdata\local\programs\python\python37\python.exe' 'c:\users\user.example\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_Metadata_for_build_wheel 'C:\U

sers\USER.EXAMPLE\AppData\Local\Temp\tmp_ccgduda' 检查日志以获取完整的命令输出

解决方法

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

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

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

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...