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文章来源:https://www.toymoban.com/news/detail-405162.html
4.pip install pyinstaller文章来源地址https://www.toymoban.com/news/detail-405162.html
到了这里,关于解决:Python3.7版本安装pyinstaller一直失败,报错提示“error: subprocess-exited-with-error”的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!