5 Replies - 4774 Views - Last Post: 29 March 2011 - 03:05 PM Rate Topic: -----

#1 youbob1212  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 16
  • View blog
  • Posts: 132
  • Joined: 31-October 10

Problems with Pygame with python 3.1

Posted 29 March 2011 - 01:08 PM

Greetings,

Ok I have finally join over to the linux side of the computing world. I'm running Ubuntu 10.10 on my PC.
Anyways, I have been spending a lot of time installing packages for python and pygame.
I got the latest, 1.9 installed, along with 2.7 and 3.1 python installed and working on my OS. However, when I go over to either one version(2.7 or 3.1) and try to import pygame, I get an syntax error.

I do believe Pygame is not install currently on to my OS, So I got a hold of the source files. Where I'm having troubles at is which files, and where do I put at; inside the directory of the Python 3.1?

In fact, that's my biggest weakness with this whole linux thing. That is I have a very limited understanding of how to put files in the right folders.

Other wise, I do understand the sudo apt-get install, update, upgrade, etc... and of course There is a healthy understanding of the package system.


Any help would be very well needed. Please point me into the right direction. Message for ADMIN/Mod If this is more of a linux problem or this topic is in any way out of place to this forum Please move it and warning me... don't delete it..

Points as always for the best answers

I should note. It does work for the python 2.6, but I really want it to work for the 3.1

Is This A Good Question/Topic? 0
  • +

Replies To: Problems with Pygame with python 3.1

#2 Motoma  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 452
  • View blog
  • Posts: 797
  • Joined: 08-June 10

Re: Problems with Pygame with python 3.1

Posted 29 March 2011 - 01:16 PM

What is the error you are getting?
Was This Post Helpful? 0
  • +
  • -

#3 atraub  Icon User is offline

  • Pythoneer
  • member icon

Reputation: 759
  • View blog
  • Posts: 2,010
  • Joined: 23-December 08

Re: Problems with Pygame with python 3.1

Posted 29 March 2011 - 01:40 PM

yeah...

1.) Please share the syntax error.

Quote

Points as always for the best answers
2.)We're not competing for your 'points'. As a rule of thumb, how about you just hit helpful if it's helpful...

This post has been edited by atraub: 29 March 2011 - 01:41 PM

Was This Post Helpful? 0
  • +
  • -

#4 youbob1212  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 16
  • View blog
  • Posts: 132
  • Joined: 31-October 10

Re: Problems with Pygame with python 3.1

Posted 29 March 2011 - 01:59 PM

View Postatraub, on 29 March 2011 - 01:40 PM, said:

yeah...

1.) Please share the syntax error.

Quote

Points as always for the best answers
2.)We're not competing for your 'points'. As a rule of thumb, how about you just hit helpful if it's helpful...


lol I know... Ok here is the syntax error
>>> import pygame
Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import pygame
ImportError: No module named pygame
>>> 


I think I need to find the module, and import my pygame files there.. no clue how, but google, you guys, or something going to tell me LOL

This post has been edited by youbob1212: 29 March 2011 - 02:01 PM

Was This Post Helpful? 0
  • +
  • -

#5 Motoma  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 452
  • View blog
  • Posts: 797
  • Joined: 08-June 10

Re: Problems with Pygame with python 3.1

Posted 29 March 2011 - 02:13 PM

Okay, so not a syntax error, an import error.

Once you download a Python package like PyGame, you will want to do something like this:

$ cd pygame-1.9.1release/
$ sudo python setup.py install



If you want to install it for a specific version of python, make sure you invoke that version:

$ cd pygame-1.9.1release/
$ sudo python2.7 setup.py install


Was This Post Helpful? 1
  • +
  • -

#6 youbob1212  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 16
  • View blog
  • Posts: 132
  • Joined: 31-October 10

Re: Problems with Pygame with python 3.1

Posted 29 March 2011 - 03:05 PM

View PostMotoma, on 29 March 2011 - 02:13 PM, said:

Okay, so not a syntax error, an import error.

Once you download a Python package like PyGame, you will want to do something like this:

$ cd pygame-1.9.1release/
$ sudo python setup.py install



If you want to install it for a specific version of python, make sure you invoke that version:

$ cd pygame-1.9.1release/
$ sudo python2.7 setup.py install



DUDE THAT DID IT!!!! WOOT!

you just saved me a lot of time, and I learn a new how to install stuff on Ubuntu linux.. I feel more complete with this new OS. It makes me regret ever using Microsoft.. Even tho their little monopoly made back during the 90s and later, made it difficult for more other peoples to develop other alternatives...
Any Ways Thank you Motoma
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1