使用pip安装Pygame失败求助:需Microsoft Visual C++ 14.3及以上
解决pip安装pygame时的VC++版本不足问题
执行pip install pygame时出现如下报错:
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.3 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
解决方法:
- 安装Microsoft C++ Build Tools,安装过程中必须勾选**Desktop development with C++**组件,该组件包含满足要求的Visual C++ 14.3及以上版本工具集。
- 安装完成后重启命令提示符或终端,重新运行
pip install pygame即可。
替代方案(无需编译):
直接安装预编译的wheel包:
- 找到匹配你Python版本和系统架构的pygame wheel文件
- 执行
pip install [wheel文件名].whl完成安装
内容的提问来源于stack exchange,提问作者123-456-789
相关产品推荐
相关产品推荐

