LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-17-2011, 12:45 PM   #1
colts18
LQ Newbie
 
Registered: Jan 2011
Posts: 2

Rep: Reputation: 0
Exclamation Trouble importing Pygame


I am new to pygame and Linux and I am using Red Hat Linux and I cannot import pygame. I thought I installed it but when I open up Python IDLE It says "No module named pygame". Does anyone know what is wrong?? I downloaded pygame1.9.1.release.tar.gz from http://www.pygame.org I might not have installed it or maybe I need something else too, I don't know.
 
Old 01-18-2011, 07:57 AM   #2
lonerider
LQ Newbie
 
Registered: Jan 2011
Posts: 3

Rep: Reputation: 0
Did you extract the tar?
If not you will have to first extract the tar using the cmd
tar -xzvf pygame1.9.1.release.tar.gz
then transfer the contents to the directory where your modules reside.
 
Old 01-18-2011, 08:49 AM   #3
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Or even better, install pygame using Ubuntu Software Center (according to your icon, you seem to be using Ubuntu). That way, it will be tracked by your package manager.
 
Old 01-19-2011, 03:52 PM   #4
colts18
LQ Newbie
 
Registered: Jan 2011
Posts: 2

Original Poster
Rep: Reputation: 0
I don't know what I did but I got Pygame for Python 2.6 working so I will just use that are there any differences?
 
Old 01-19-2011, 05:15 PM   #5
Snark1994
Senior Member
 
Registered: Sep 2010
Distribution: Debian
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
Differences to using it under Python 3.1, you mean (or another version of python)? There shouldn't be, as far as I'm aware the Pygame code will be the same, only some of the basic Python syntax will have changed
 
Old 01-19-2011, 05:38 PM   #6
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
If PyGame isn't edited to follow the slightly different syntax, Python 3 will fail to run it.

But if the OP uses Python 2, PyGame for Python 2 will work, of course.
 
Old 01-20-2011, 09:37 AM   #7
Snark1994
Senior Member
 
Registered: Sep 2010
Distribution: Debian
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
I had assumed the OP had downloaded the correct version for the version of python they were using. http://www.pygame.org/download.shtml has windows binary packages for both 3.1 and several 2.x, so I presume it supports both - but perhaps the previous difficulties were caused by using different pygame/python versions
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble importing QIF Files from Money to Gnucash velibos Linux - Software 3 11-07-2015 02:39 AM
[SOLVED] Importing data into MySQL DB with OpenOffice Base: Trouble with dates cantab Linux - Software 4 05-16-2010 12:02 PM
trouble importing mail and settings from Windows mail into Evolution austinium Linux - Newbie 2 06-20-2008 09:48 AM
importing trouble....python...regarding Tkinter maseby Programming 0 11-03-2003 01:54 PM
pygame kierwind Linux - Software 5 05-21-2003 04:19 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration