安装 pyinstaller 失败解决过程

    技术2022-07-11  115

    安装 pyinstaller 失败解决过程

    安装问题出现以下错误信息: 解决总结

    安装问题

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

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

    出现以下错误信息:

    出现了一个参数错误

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

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

    pip install 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

    大功告成,安装成功

    总结

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

    Processed: 0.030, SQL: 9