在终端上为 python 2.7.5 安装 pygame 模块 [英] installing pygame module for python 2.7.5 on terminal

查看:55
本文介绍了在终端上为 python 2.7.5 安装 pygame 模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我的 mac osx 10.9.1 上下载了 32 位 pygame 模块,但我不知道如何安装它.我尝试了不同的东西,但我无法让它在终端中工作.我能够使用终端轻松下载 PIL 包.有人可以给我安装pygame的所有步骤吗?

i have already downloaded 32 bit pygame module on my mac osx 10.9.1 but i have no idea how to install it . I have tried different things but i am not able to get it working in terminal. I was able to easily download PIL package using terminal. Can Someone please give me all the steps for installing pygame?

推荐答案

二进制包可从 http://www.pygame.org/download.shtml - 只需运行下载的 .dmg.

Binary packages are available from http://www.pygame.org/download.shtml - just run the downloaded .dmg.

如果您下载了源包,请解压并在文件夹中运行 python setup.py install.

If you've downloaded a source package, extract it and run python setup.py install inside the folder.

否则您可能能够:

easy_install pygame

pip install pygame

如果您要安装到系统 python 中,其中每一个都可能需要 sudo 才能运行.

Each of these might need sudo to run if you are installing into the system python.

如果您使用的是包管理器,您可能会使用

If you are using a package manager you might use

port install py-game

fink install pygame

或者可能

brew install pygame

这篇关于在终端上为 python 2.7.5 安装 pygame 模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆