翻译pygame wiki,学习英语和pygame,有错敬请指出!
GettingStarted — wiki
// 开始学习 -- wiki
Pygame Installation
// Pygame安装
Pygame requires Python; if you don't already have it, you can download it from python.org. Use python 3.6.1 or greater, because it is much friendlier to newbies, and additionally runs faster.
//Pygame需要Python开发环境支持;如果没有安装python,可从官网 python.org上下载安装。建议使用python 3.6.1或更高的版本,对初学者更友好,运行速度更快。
The best way to install pygame is with the pip tool (which is what python uses to install packages). Note, this comes with python in recent versions. We use the --user flag to tell it to install into the home directory, rather than globally.
//安装pygame模块最好的方法是使用pip工具安装(pip是python安装模块的常用方法)。注意,这是python最近版本支持的方法。使用--user参数设定安装路径,不加参数安装路径就选默认路径。
python3 -m pip install -U pygame --user
//安装命令:python3 -m pip install -U pygame --user
To see if it works, run one of the included examples:
//使用以下示例检测安装是否成功:
python3 -m pygame.examples.aliens
//检测命令: python3 -m pygame.examples.aliens
If it works, you are ready to go! Continue on to the tutorials.
//如果安装成功,可以开始pygame探索之路啦!继续学习教程 tutorials.
学习笔记: 在cmd窗口输入: pip install -U pygame --user
显示安装后pygame模块路径 C:\Users\zly\AppData\Local\Programs\Python\Python37\Lib\site-packages