domingo, 12 de abril de 2015

installing pygame on ubuntu 14.10

this one was really tricky, in theory you just need this one:

apt-get install python-pygame

but it's not so easy, there are several unmet dependencies, so to accomplish it you may follow those steps:

1. install some dependencies:

sudo apt-get install mercurial python-dev 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

2. you will have this unmet dependence:
sudo apt-get install python-numpy

that is because gcc version is upper than need it, here is the real trick

3. sudo aptitude install liblapack-dev liblapack3 libgfortran3

then you'll get a suggestion to not install any of them, press N and you'll get another one but this time to downgrade several packages, press Y and you'll have to wait some minutes. I know gcc is one of the core packages but after finish the download process I restart Ubuntu (just in case) and everythings works.

4. sudo aptitude install python-numpy python-pygame

5. that's all

Best