pygame最方便的安装方式

2019-05-23  本文已影响0人  唐小明_d419

搜索python pygame会有很多方法,因为python的版本的原因以及英文的原因

到了pygame.org/download.shtml   进入pygame.org要看到这个页面都很难,太奇怪

进入python官网点击PyPI

搜pygame 下载对应的版本,你会发现好多版本

pygame-1.9.3-cp36-cp36m-win_amd64.whl

cp36的意思就是python 3.7 的意思 amd64表示是64位的意思

反正就是乱,虽然csdn上有很多的方法:

不过我在官网上看到

GettingStarted — wiki

Pygame Installation

Pygame requires Python; if you don't already have it, you can download it from python.orgUse python 3.6.1 or greater, because it is much friendlier to newbies, and additionally runs faster.

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.

python3-m pip install-U pygame--user

To see if it works, run one of the included examples:

python3-m pygame.examples.aliens

If it works, you are ready to go! Continue on to the tutorials.

大约的意思就是 开始运行cmd 

进入python的目录 

python -m pip install-U pygame--user

输入这个命令,就会自动下载安装

下面这一条

python -m pygame.examples.aliens

是测试看安装成功了没

这样子好像就不用管版本的问题

上一篇下一篇

猜你喜欢

热点阅读