Sunday, November 13, 2016

pygame on ubuntu 16.10 installation

sudo apt install devscripts     # to install dget
dget -u  http://httpredir.debian.org/debian/pool/main/p/pygame/pygame_1.9.1release+dfsg-10.dsc

sudo apt install libsdl-ttf2.0 libportmidi-dev libsdl-mixer1.2-dev libsdl-image1.2-dev libsmpeg-dev


list of dependencies

sudo apt-get install mercurial python3-dev python3-setuptools python3-numpy python3-opengl libav-tools 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 libtiff5-dev libx11-6 libx11-dev fluid-soundfont-gm timgm6mb-soundfont xfonts-base xfonts-100dpi xfonts-75dpi xfonts-cyrillic fontconfig fonts-freefont-ttf libfreetype6-dev



Steps to install PyGame using pip
  1. Install build dependencies (on linux):
    sudo apt-get build-dep python-pygame
  2. Install mercurial to use hg (on linux):
    sudo apt-get install mercurial
    On Windows you can use the installer: http://mercurial.selenic.com/wiki/Download
  3. Use pip to install PyGame:
    pip install hg+http://bitbucket.org/pygame/pygame
    If the above gives freetype-config: not found error (on Linux), then try sudo apt-get install libfreetype6-dev and then repeat 3.
Alternative way:
# Grab source
hg clone https://bitbucket.org/pygame/pygame

# Finally build and install
cd pygame
python setup.py build
sudo python setup.py install

No comments:

Post a Comment