进入这个网站

http://www.pygame.org/wiki/Compilation

可以选择不同系统的安装方法

其中ubuntu的安装命令是

#这是python 2.X

#install dependencies
sudo apt-get install mercurial python-dev python-numpy ffmpeg \
    libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsmpeg-dev \
    libsdl1.2-dev  libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev
 
# Grab source
hg clone https://bitbucket.org/pygame/pygame
 
# Finally build and install
cd pygame
python setup.py build
sudo python setup.py install




#这是python 3.X

#install dependencies
sudo apt-get install mercurial python3-dev python3-numpy ffmpeg \
    libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsmpeg-dev \
    libsdl1.2-dev  libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev
 
# Grab source
hg clone https://bitbucket.org/pygame/pygame
 
# Finally build and install
cd pygame
python3 setup.py build
sudo python3 setup.py install

 

相关文章:

  • 2021-09-24
  • 2021-11-11
  • 2021-12-19
  • 2021-08-25
  • 2021-11-08
  • 2021-05-26
  • 2021-08-02
猜你喜欢
  • 2021-08-11
  • 2021-11-12
  • 2021-06-08
  • 2021-06-02
相关资源
相似解决方案