由于系统 Python 2.7 的要求,Pygame 安装失败,即使我有 Python 2.7

Posted

技术标签:

【中文标题】由于系统 Python 2.7 的要求,Pygame 安装失败,即使我有 Python 2.7【英文标题】:Pygame installation fails due to requirement of System Python 2.7, even though I have Python 2.7 【发布时间】:2014-03-15 10:18:15 【问题描述】:

我正在尝试在我的 Mac 上安装 pygame,但出现错误

pygame 1.1release 无法安装在这个磁盘上。

pygame 需要系统 Python 2.7 才能安装

我正在运行 python 2.7

$ which python
/usr/bin/python
$ python --version
Python 2.7.5

我从 http://pygame.org/download.shtml 下载了 pygame 并选择了文件 pygame-1.9.1release-python.org-32bit-py2.7-macosx10.3.dmg 我正在运行 osx 10.9.1

为什么我在运行 Python 2.7 时会收到此错误,如何在 mac 上成功安装 pygame?

【问题讨论】:

如果您有 64 位 python,则可能会发生此问题,因为 pygame 仅支持 32 位 python。您是否尝试过 this post 中建议的修复? 【参考方案1】:

如果您运行的是 10.9,则需要 MacOS 10.7 build 或者您也可以使用 install using homebrew 或只需 install from source。

我测试了在 OS 10.9.2 上安装 10.7 版本,它运行良好。

请注意,您可能还需要安装 XQuartz 才能使其在最新版本的 OSX 上运行。

【讨论】:

以上是关于由于系统 Python 2.7 的要求,Pygame 安装失败,即使我有 Python 2.7的主要内容,如果未能解决你的问题,请参考以下文章

Ubuntu 将Python从默认的2.7升级到3.* 版本

当 EB 环境为 python 3.6 时,使用 python 2.7 安装要求时出现 AWS 错误

ansible安装

Python 3.7 上的 Flask 比具有 Google App Engine 标准环境的 Python 2.7 上的 webapp2 要求更高(也更昂贵)

使用 OpenCV+Python-2.7 进行全身检测和跟踪

代码在python 2.6下无效,但在2.7中很好[重复]