[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] import failure



Hello Denis,

 

I use Kubuntu and know that this is doable.

 

A quick question: are you trying to use Pygame from Python 3 or Python 2? Because the âpython-pygameâ package that Lucas mentioned will only work under Python 2.x.

 

If you need to use Pygame under Python 3, youâll need to install a new repository, like this one:

 

https://launchpad.net/~thopiekar/+archive/ubuntu/pygame

 

Then youâll be able to apt-get install python3-pygame.

 

As a side note, you may already be aware that thereâs a Perlin Noise Generator contribution for Pygame here:

 

http://www.pygame.org/project-Perlin+Noise+Generator-1044-.html

 

Good luck!

~ Michael

 

On Fri : Jan 23, 2015 1:27:28 PM you wrote:

> Hello,

>

> I am new to the list. My present project is to try several methods of game map

> generation (perlin noise, cellular automatons, etc...) and for now barely use

> pygame as "visualiser" (just because I could not find a nicer graphics lib,

> neither for python now for any other lang I know).

>

> I have just installed pygame on a computer running Ubuntu (actually Lubuntu, but

> this should not change anything, I guess), using the std package manager. Now,

> import pygame

> fails with the usual

> ImportError: No module named 'pygame'

> I tried to (re)install using apt-get directly, but the command does not find a

> package 'pygame' (despite the fact that the 'Universe' repository is well

> activated).

>

> What am I doing wrong? I do not know what else to try.

>

> I take the opportunity to ask about python 2 vs python 3 when using pygame (I

> tried both: no difference on the error).

>

> Thank you,

> denis