[英]Trying to install pygame on OSX 10.11 for python2
I'm running OSX 10.11 and have python 2.7.10 installed on my computer. 我正在运行OSX 10.11并在我的计算机上安装了python 2.7.10。 I want to install pygame1.9.2 for the said environment (don't want to install it for python3 which is installed on my computer as well).
我想为所述环境安装pygame1.9.2(不想为我的计算机上安装的python3安装它)。
When I try to install this one - http://www.pygame.org/ftp/pygame-1.9.2pre-py2.7-macosx10.7.mpkg.zip - it says, "This package is incompatible with this version of OS X and may fail to install." 当我尝试安装这个 - http://www.pygame.org/ftp/pygame-1.9.2pre-py2.7-macosx10.7.mpkg.zip - 它说,“这个包与这个版本不兼容OS X可能无法安装。“ Even if I continue, installation fails somehow.
即使我继续,安装也会以某种方式失败。
I tried "pip install pygame" then it says 它说,我尝试了“pip install pygame”
"Collecting pygame Could not find a version that satisfies the requirement pygame (from versions: ) No matching distribution found for pygame. "
“收集pygame无法找到满足要求pygame的版本(来自版本:)没有为pygame找到匹配的发行版。”
How do I install it? 我该如何安装?
(for future reference) After spending many hours I found the following command to be working! (供将来参考)花了很多时间后我发现以下命令正常工作!
sudo pip install --user git+https://github.com/pygame/pygame/
It's not 1.9.2 but can run what I wanted with python 2.7.10 它不是1.9.2但可以用python 2.7.10运行我想要的
>>> pygame.__version__
'2.0.0.dev0'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.