今天装了python3.11,在安装pygame的时候总是会出现如下的错误:
错误内容:
[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.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
我一开始以为是pip的版本问题,首先我更新了pip:
python.exe -m pip install --upgrade pip
但是并没有用。我又添加了一个工具:
pip install setuptools==50.3.2
最后发现是现在3.11版本的pygame未发布新版版本,所以可以使用pip install pygame --pre安装预发版。
pip install pygame --pre
网友评论