Skip to content

Instantly share code, notes, and snippets.

@lucarin91
Last active October 28, 2015 10:21
Show Gist options
  • Save lucarin91/b67354a58331d23a1e8f to your computer and use it in GitHub Desktop.
Save lucarin91/b67354a58331d23a1e8f to your computer and use it in GitHub Desktop.
#!/bin/bash
printf "Install all the dependencies..\n"
sudo apt-get update
sudo apt-get install -y mercurial python3-dev python3-numpy libsdl-dev libsdl-image1.2-dev \
libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsmpeg-dev libportmidi-dev \
libavformat-dev libswscale-dev libjpeg-dev libfreetype6-dev
printf "\nDownload pygame source..\n"
cd /tmp
hg clone https://bitbucket.org/pygame/pygame
printf "\nBuilding..\n"
cd /tmp/pygame
python3 setup.py build
printf "\nInstalling..\n"
sudo python3 setup.py install
printf "\nclean-up..\n"
rm -Rf /tmp/pygame
printf "\nall credits goes to\nhttp://askubuntu.com/questions/401342/how-to-download-pygame-in-python3-3"

Python3 Pygame Installation Script

A bash script to download and install the last version of pyGame, the one compatible with python3.4, from source. This script was design for ubuntu/debian system, but changing the part regarding the dependency installation, it will possible work in other distribution.

all credits goes to: http://askubuntu.com/questions/401342/how-to-download-pygame-in-python3-3

@dido18
Copy link

dido18 commented Oct 27, 2015

Tested Operating System

  • Ubuntu 14.04 LTS
  • Crunchbang!++

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment