On my ubuntu box I have python2.6 and python 3.1 installed. I did some work with pygame / python2.6, and now I want to play with python3.1 / pygame. However, in idle (using python3.1) when I import pygame, I get errors.

>>> import pygame
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import pygame
ImportError: No module named pygame

So, what is the proper way to install pygame for multiple python installs?

link|improve this question
feedback

1 Answer

up vote 1 down vote accepted

Install it multiple times.

python2.6 setup.py install
python3.1 setup.py install
link|improve this answer
hmmm.. Im going to need some additional hand holding I think. Im going to assume setup.py would be in somewhere in a python directory and that Im supposed to get in that directory then run it. Where do I get setup.py? I searched my harddrive for it, and I dont see it (damn enter button posts...) anywhere in there, and I dont see it on the pygame downloads page. Will continue looking. – Jason Apr 26 '11 at 20:23
setup.py comes with the source tarball for the Python module you're installing (Pygame in this instance). docs.python.org/install/index.html – Ignacio Vazquez-Abrams Apr 26 '11 at 20:36
Aha! Got it, works now, thank you! – Jason Apr 26 '11 at 20:43
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.