iis服务器助手广告广告
返回顶部
首页 > 资讯 > 后端开发 > Python >解决:Python3.7版本安装pyinstaller一直失败,报错提示“error: subprocess-exited-with-error”
  • 393
分享到

解决:Python3.7版本安装pyinstaller一直失败,报错提示“error: subprocess-exited-with-error”

pythonpip 2023-09-05 09:09:15 393人浏览 薄情痞子

Python 官方文档:入门教程 => 点击学习

摘要

python3.7版本安装pyinstaller一直失败解决!无论是直接pip install pyinstaller还是指定pyinstaller各种版本安装,又或者PyCharm进行安装也是失败,再就是重装PIP,还把pyinstall

python3.7版本安装pyinstaller一直失败解决!无论是直接pip install pyinstaller还是指定pyinstaller各种版本安装,又或者PyCharm进行安装也是失败,再就是重装PIP,还把pyinstaller的wheel文件下载到本地进行安装,总之试了各种方法都无效,折腾了好久。

pip install pyinstaller报错如下:

error: subprocess-exited-with-error

AttributeError: type object 'Distribution' has no attribute '_finalize_feature_opts'

note: This error originates from a subprocess, and is likely not a problem with pip.

error: metadata-generation-failed

解决思路如下:更新 setuptools 版本,先卸载setuptools再重新安装

pip uninstall setuptools
pip install setuptools

发现重装后的setuptools版本是有变化的,版本比之前的要低了。

然后再尝试安装pyinstaller:pip install pyinstaller

依旧报错,但是报错信息变了:

error: subprocess-exited-with-error

error: invalid command 'egg_info'

      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.

error: metadata-generation-failed

× Encountered error while generating package metadata.

╰─> See above for output.

主要报错是由于:error: invalid command 'egg_info'

于是尝试继续更新setuptools:pip install --upgrade pip setuptools

从44.1.1更新到了65.7.0,发现版本又回到了刚开始的版本,相当于重新卸载再安装一遍!

再尝试进行pyinstaller安装吧:pip install pyinstaller

神奇,竟然成功了!

然后查询下pyinstaller的版本,发现是最新版本的pyinstaller。

总结:搞了半天,一直error: subprocess-exited-with-error,AttributeError: type object 'Distribution' has no attribute '_finalize_feature_opts'报错安装不上pyinstaller,

最终卸载重装了setuptools完美解决!!!

解决办法的指令如下:

1.pip uninstall setuptools

2.pip install setuptools

3.pip install --upgrade pip setuptools

4.pip install pyinstaller

来源地址:https://blog.csdn.net/CDaron/article/details/128689573

--结束END--

本文标题: 解决:Python3.7版本安装pyinstaller一直失败,报错提示“error: subprocess-exited-with-error”

本文链接: https://www.lsjlt.com/news/395064.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作