Installing Pygame for Python 3.1.2 in Ubuntu -


i'm reading book introduction computer science using python , pygame paul craven (note: legally available free online). in book, uses combination of python 3.1.3 , pygame 1.9.1 . in linux ubuntu machine, have python 3.1.2 after sudo apt-get installed python-pygame (version 1.9.1), python 3.1.2 can't import pygame.

python 3.1.2 (r312:79147, sep 27 2010, 09:45:41)  [gcc 4.4.3] on linux2 type "help", "copyright", "credits" or "license" more information. >>> import pygame traceback (most recent call last):   file "<stdin>", line 1, in <module> importerror: no module named pygame 

python 2.6.5 imports without fuss, however,

python 2.6.5 (r265:79063, apr 16 2010, 13:09:56)  [gcc 4.4.3] on linux2 type "help", "copyright", "credits" or "license" more information. >>> import pygame >>>  

are aware of issues linux/ubuntu's python 3.1.2 (prof. craven used windows in book)? how come pygame 1.9.1 worked python 3.1.3 not 3.1.2?

thanks pointers. (--,)

it's because installing python-pygame package installs default version of python on system, 2.6.5 in case. should download pygame package , use setup.py install in 3.1.2.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -