zyyzxx
Posts: 16
Joined: Sat Aug 18, 2012 1:11 pm
Location: Cheltenham

pygame installation

Sat Aug 18, 2012 1:17 pm

How do I install the pygame libraries on raspberry pi?
Its easy enough on Windows, but how to do it on Debian.
I have tried:
sudo apt-get install pygame
and
sudo apt-get install python-pygame
without success.

Regards Trevor

vinntec
Posts: 145
Joined: Thu Aug 02, 2012 9:37 am
Location: Basingstoke, UK

Re: pygame installation

Sat Aug 18, 2012 2:24 pm

If you want to use Python 2 and you are using Wheezy then Pygame is already installed. If you want to use it with Python 3 then I have the details on what to do in my Wiki entry see http://elinux.org/RPI_Trinity_Computer_Club. Does that help? Peter

zyyzxx
Posts: 16
Joined: Sat Aug 18, 2012 1:11 pm
Location: Cheltenham

Re: pygame installation

Sat Aug 18, 2012 6:01 pm

zyyzxx wrote:How do I install the pygame libraries on raspberry pi?
Its easy enough on Windows, but how to do it on Debian.
I have tried:
sudo apt-get install pygame
and
sudo apt-get install python-pygame
without success.

Regards Trevor
Thanks vinntec.
The first 3 lines worked fine.
The fourth line reported an error. Could you have omitted 'install' after apt-get?
I changed the line and it seemed to work ok.
I then had trouble with the line 'hg clone..'
Response was '-bash: hg: command not found.
Should it be git clone...
I dont know, my Unix knowledge is very limited.

Hope you can help
Regards Trevor

vinntec
Posts: 145
Joined: Thu Aug 02, 2012 9:37 am
Location: Basingstoke, UK

Re: pygame installation

Sat Aug 18, 2012 6:12 pm

Hi Trevor - there were a couple of typos which I made after splitting the apt-get command into multiple lines rather than one great long one, which I have corrected on the Wiki already.

The
hg
command requires
mercurial
to be installed. I thought I had added it - OK I will go and do it now! In the meanwhile, if you install it yourself you can continue from there:

Code: Select all

sudo apt-get install mercurial
Regards - Peter

vinntec
Posts: 145
Joined: Thu Aug 02, 2012 9:37 am
Location: Basingstoke, UK

Re: pygame installation

Sat Aug 18, 2012 6:20 pm

Online version has been updated - so hopefully instructions for installing PyGame with Python 3 will work out of the box now! Peter

zyyzxx
Posts: 16
Joined: Sat Aug 18, 2012 1:11 pm
Location: Cheltenham

Re: pygame installation

Sat Aug 18, 2012 8:08 pm

Thanks Peter.
Wow! Pygame now installed and works seamlessly.

Regards Trevor

ph1lj
Posts: 6
Joined: Sun Dec 25, 2011 11:05 pm

Re: pygame installation

Sat Sep 08, 2012 8:08 pm

hi

when I try this process - it appears not to be able to locate a number of files on the raspberry.org server - anybody else had this problem?

HELP

rasberrypi
Posts: 10
Joined: Mon Dec 23, 2013 10:01 am

Re: pygame installation

Mon Jun 23, 2014 1:07 pm

hi
I have been having trouble installing pygame on my raspberry pi at school, but after one last effort in the lx terminal I finally found out how to install it,as I was just playing about with commands I thought might do it the code I have done so far says it has installed it although python is not picking it up the terminal says it has installed so I suspect there is more, but anyway...

Code: Select all

wget http://www.s3.amazonaws.com/pygame
.

Return to “Python”