Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Install it multiple times.

python2.6 setup.py install
python3.1 setup.py install
share|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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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