centos上安裝pygame

安裝前依賴包檢查及安裝python

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.1releaselinux

#python config.pyui

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 (忽略)url

顯示以上信息,而且相關軟件包都能found到,便可繼續安裝pygame
#python setup.py build
#python setup.py install


參考:http://pygame.org/wiki/CompileRedHat.net

相關文章
相關標籤/搜索