pygame和python的区别_安装PyGame,Python2.7和3.4之间的区别?

我想使用PyGame模块,当然,我会着手安装它。因为python的默认版本是2.7,所以我下载了python3.4(更早的时候),现在一直在使用它。安装PyGame时,我在终端中输入以下命令:python3.4 -m pip install hg+http://bitbucket.org/pygame/pygame

如您所见,我使用pip和{}来帮助我。在

尝试使用上述命令安装PyGame时,安装似乎已开始,但返回以下错误:WARNING, No “Setup” File Exists, Running “config.py”

Using Darwin configuration…

/bin/sh: smpeg-config: command not found

/bin/sh: smpeg-config: command not found

/bin/sh: smpeg-config: command not found

/bin/sh: /usr/X11R6/bin/freetype-config: No such file or directory

/bin/sh: /usr/X11R6/bin/freetype-config: No such file or directory

/bin/sh: /usr/X11R6/bin/freetype-config: No such file or directory

WARNING: “smpeg-config” failed!

WARNING: “/usr/X11R6/bin/freetype-config” failed!

Hunting dependencies…

SDL : found 1.2.15

Framework SDL not found

FONT : found

Framework SDL_ttf not found

IMAGE : found

Framework SDL_image not found

MIXER : found

Framework SDL_mixer not found

SMPEG : not found

Framework smpeg not found

Framework CoreMIDI found

Framework QuickTime found

PNG : found

JPEG : found

PORTMIDI: found

FREETYPE: not found

AVFORMAT: not found

SWSCALE : not found

If you get compiler errors during install, doublecheck

the compiler flags in the “Setup” file.

Continuing With “setup.py”

Skipping module _numericsurfarray for Python 3.4.2 (v3.4.2:ab2c023a9432, Oct 5 2014, 20:42:22)

[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] build.

Skipping module _numericsndarray for Python 3.4.2 (v3.4.2:ab2c023a9432, Oct 5 2014, 20:42:22)

[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] build.

no previously-included directories found matching ‘*/CVS’

no previously-included directories found matching ‘//CVS’

我以前通过terminal安装了这些依赖项,但是它们只为Python2.7安装,而python3.4无法识别它们吗?(我不知道这是不是一个有效的建议,因为这类东西不是我的专长)

我进入Python3.4(交互模式),导入PyGame成功了(但是我想我不能使用模块的所有功能)。在

但是,当我使用默认的python(2.7)在终端上运行相同的命令时,它安装成功:

^{pr2}$

有人能解释一下这种差异的原因吗?我想我可以在制作游戏时使用python2.7,但是要在同一语言的两个版本之间切换还是很乏味的。在

Original: https://blog.csdn.net/weixin_39540271/article/details/113637776
Author: weixin_39540271
Title: pygame和python的区别_安装PyGame,Python2.7和3.4之间的区别?

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/783404/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球