New to python. Need "pygame" - Raspberry Pi Forums


hi there,
son , have bought raspberry pi , new kind of computing. son trying python project book , told him type "import pygame". computer said pygame module didn't exist. did internet search , found code said install pygame module python 3. not cplete said there wrong "lbsdl-config " may have got term wrong that. not sure do.
bought our pi preformatted sd card , have installed raspian on it. has "idle" , "idle 3" on presume python.

gratefully received

hi,
edit: have 2 choices, take easy route , write program in python2 or try:

hope these instructions help:

(note, looks take awhile, ready set going , go off , other things couple of hours).
numpy module

requires lot of system resources (memory) build. run nothing else running - not run inside x! may need enable swap space.

n.b. takes around 1 hr 40 build

code: select all

wget http://pypi.python.org/packages/source/n/numpy/numpy-1.6.1.tar.gz tar xvfz numpy-1.6.1.tar.gz cd numpy-1.6.1 python3 setup.py build sudo python3 setup.py install cd ~
pygame module

latest (stable) release of pygame not support python 3.2 have use development source. make sure install numpy module first. note sound not work yet - i'll update guide instructions when has been fixed.

(takes around 15 minutes build).

code: select all

# pygame source code sudo apt-get install mercurial hg clone https://bitbucket.org/pygame/pygame cd pygame  # install dependencies sudo apt-get install libsdl-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev  sudo apt-get install libsmpeg-dev libportmidi-dev libavformat-dev libswscale-dev  # build , install pygame python3 setup.py build sudo python3 setup.py install
see this post on these forums


raspberrypi



Comments

Popular posts from this blog

Convierte tu Raspberry en un NAS. Firmware fvdw-sl 15.3 - Raspberry Pi Forums

How to format a Get Request

avrdude: verification error, first mismatch at byte 0x0000 0x0c != 0x62