centos上安装pygame

安装前依赖包检查及安装

python-devel SDL_image-devel SDL_mixer-devel SDL_ttf-devel SDL-devel numpy subversion portmidi-devel libsmpeg-devel
-------------------
#yum install python-devel SDL_image-devel SDL_mixer-devel SDL_ttf-devel SDL-devel numpy subversion portmidi-devel -y
@安装libsmpeg-devel

    Create the repository config file /etc/yum.repos.d/linuxtech.repo:

    [linuxtech]
    name=LinuxTECH
    baseurl=http://pkgrepo.linuxtech.net/el6/release/
    enabled=1
    gpgcheck=1
    gpgkey=http://pkgrepo.linuxtech.net/el6/release/RPM-GPG-KEY-LinuxTECH.NET

    Install libsmpeg-devel rpm package:

    # yum install libsmpeg-devel
安装pygame
------------------
#wget http://www.pygame.org/ftp/pygame-1.9.1release.tar.gz
#tar xvf pygame-1.9.1release.tar.gz
#cd pygame-1.9.1release

#python config.py

SDL     : found 1.2.14
FONT    : found
IMAGE   : found
MIXER   : found
SMPEG   : found 0.4.5
PNG     : found
JPEG    : found
SCRAP   : found
PORTMIDI: found
PORTTIME: not found (忽略)

显示以上信息,并且相关软件包都能found到,即可继续安装pygame
#python setup.py build
#python setup.py install


参考:http://pygame.org/wiki/CompileRedHat

转载于:https://www.cnblogs.com/su-han/p/5581338.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值