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

时间:2022-04-07 23:51:25

I'm trying to install pygame on my mac but I am getting the error

我想在我的mac上安装pygame,但是我得到了错误

pygame 1.1release can't be installed on this disk.

pygame 1.1版本不能安装在这个磁盘上。

pygame requires System Python 2.7 to install

pygame需要系统Python 2.7才能安装。

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

I'm running python 2.7

我运行python 2.7

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

I downloaded pygame from http://pygame.org/download.shtml and selected the file pygame-1.9.1release-python.org-32bit-py2.7-macosx10.3.dmg I'm running osx 10.9.1

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

Why do I receive this error when I'm running Python 2.7 and how can I successfully install pygame on mac?

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

1 个解决方案

#1


4  

If you're running 10.9, you will need the MacOS 10.7 build or you can also install using homebrew or just install from source.

如果您正在运行10.9,那么您将需要MacOS 10.7构建版本,或者也可以使用homebrew安装,或者直接从源代码安装。

I tested installing the 10.7 build on OS 10.9.2 and it worked fine.

我测试了在OS 10.9.2上安装10.7 build,它工作得很好。

Note that you will also probably need to install XQuartz to make it work on latests versions of OSX.

注意,您可能还需要安装XQuartz才能使它在OSX的最新版本上工作。

#1


4  

If you're running 10.9, you will need the MacOS 10.7 build or you can also install using homebrew or just install from source.

如果您正在运行10.9,那么您将需要MacOS 10.7构建版本,或者也可以使用homebrew安装,或者直接从源代码安装。

I tested installing the 10.7 build on OS 10.9.2 and it worked fine.

我测试了在OS 10.9.2上安装10.7 build,它工作得很好。

Note that you will also probably need to install XQuartz to make it work on latests versions of OSX.

注意,您可能还需要安装XQuartz才能使它在OSX的最新版本上工作。