欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

安装 pyinstaller 失败解决过程

程序员文章站 2023-10-27 09:44:10
安装 pyinstaller 失败解决过程安装问题解决安装问题在命令行中运行,使用清华源pip install pyinstaller -i https://pypi.tuna.tsinghua.edu.cn/simple出现以下错误信息:出现了一个参数错误AttributeError: module 'setuptools.build_meta' has no attribute '__legacy__'不知道是为什么然后不使用清华源试试:pip install pyinstall...

安装 pyinstaller 失败解决过程

安装问题

在命令行中运行,使用清华源

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

出现以下错误信息:

安装 pyinstaller 失败解决过程
出现了一个参数错误

AttributeError: module 'setuptools.build_meta' has no attribute '__legacy__'

不知道是为什么
然后不使用清华源试试:

pip install pyinstaller

得到结果:
安装 pyinstaller 失败解决过程

ERROR: Could not find a version that satisfies the requirement setuptools>=40.8.0 (from versions: none)

可以看出是因为setuptools的版本不满足要求

解决

更新sutuptools
cmd中运行:

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

最后再运行:

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

大功告成,安装成功

总结

在安装过程中,可能有各种各样的问题。可能会被搞得焦头烂额,身心俱疲。但是不要灰心,只要思想不滑坡,办法总比困难多。记得看清楚报错信息。

本文地址:https://blog.csdn.net/qq_37476656/article/details/107062290