Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #47385 > unrolled thread

Installing PyGame?

Started byEam onn <letsplaysforu@gmail.com>
First post2013-06-08 09:07 -0700
Last post2013-06-09 08:51 +1000
Articles 11 — 5 participants

Back to article view | Back to comp.lang.python


Contents

  Installing PyGame? Eam onn <letsplaysforu@gmail.com> - 2013-06-08 09:07 -0700
    Re: Installing PyGame? Fábio Santos <fabiosantosart@gmail.com> - 2013-06-08 17:41 +0100
      Re: Installing PyGame? Eam onn <letsplaysforu@gmail.com> - 2013-06-08 10:07 -0700
        Re: Installing PyGame? cclauss@bluewin.ch - 2013-06-08 10:58 -0700
          Re: Installing PyGame? Eam onn <letsplaysforu@gmail.com> - 2013-06-08 11:05 -0700
            Re: Installing PyGame? Eam onn <letsplaysforu@gmail.com> - 2013-06-08 11:07 -0700
              Re: Installing PyGame? Fábio Santos <fabiosantosart@gmail.com> - 2013-06-08 20:12 +0100
              Re: Installing PyGame? cclauss@bluewin.ch - 2013-06-08 12:23 -0700
            Re: Installing PyGame? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-06-08 15:10 -0400
            Re: Installing PyGame? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-06-08 16:17 -0400
        Re: Installing PyGame? Neil Hodgson <nhodgson@iinet.net.au> - 2013-06-09 08:51 +1000

#47385 — Installing PyGame?

FromEam onn <letsplaysforu@gmail.com>
Date2013-06-08 09:07 -0700
SubjectInstalling PyGame?
Message-ID<5c069831-8cab-43da-a4f9-ccec68cdc101@googlegroups.com>
Perhaps this isn't the right place to post this, but it's the only place I could find.

I asked yesterday or the day before about Python Game Development, and have found a few tutorials on PyGame. Now I have a bigger problem: HOW THE HECK DO I INSTALL PYGAME!?!?! System Details:

• Mac OS X 10.8.4 Mountain Lion
• 4GB DDR3 RAM

I do have Window's installed, as well as Ubuntu 11.04 but I would like to use Mac OS X if possible. I've tried using MacPorts, Fink, the Mac DMG, source installing, installing NumPY, just about every way possible. I can't seem to get it working, I keep getting an error in all my versions of IDLE. I've tried:

• IDLE 2.5
• IDLE 2.7.2
• IDLE 2.7.3
• IDLE 3.1
• IDLE 3.3.1

None of the versions work. I'm using PyGame 1.9.1.

Thanks! Any help is appreciated!

[toc] | [next] | [standalone]


#47388

FromFábio Santos <fabiosantosart@gmail.com>
Date2013-06-08 17:41 +0100
Message-ID<mailman.2888.1370709708.3114.python-list@python.org>
In reply to#47385

[Multipart message — attachments visible in raw view] — view raw

On 8 Jun 2013 17:17, "Eam onn" <letsplaysforu@gmail.com> wrote:
> I keep getting an error in all my versions of IDLE.

What error is that? Show us. Errors carry strong hints.

Also, are you following an install guide/tutorial? Which one?

Cheers

[toc] | [prev] | [next] | [standalone]


#47391

FromEam onn <letsplaysforu@gmail.com>
Date2013-06-08 10:07 -0700
Message-ID<44636430-af69-4162-adab-8f595da3cdd7@googlegroups.com>
In reply to#47388
On Saturday, June 8, 2013 5:41:40 PM UTC+1, Fábio Santos wrote:
> On 8 Jun 2013 17:17, "Eam onn" <letspl...@gmail.com> wrote:
> 
> > I keep getting an error in all my versions of IDLE. 
> 
> What error is that? Show us. Errors carry strong hints.
> 
> Also, are you following an install guide/tutorial? Which one?
> 
> Cheers

I'm not following a guide, but I have followed about 20 - No exaggeration. Here's the error I am getting:

ERROR 1: Terminal
--------

COMMAND: import pygame

  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/__init__.py", line 95, in <module>
    from pygame.base import *
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so, 2): no suitable image found.  Did find:
	/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so: no matching architecture in universal wrapper


ERROR 2: IDLE (all versions)
--------

COMMAND: import pygame

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




Any idea as to what is going on? Terminal is V2.7.3 of Python.

[toc] | [prev] | [next] | [standalone]


#47395

Fromcclauss@bluewin.ch
Date2013-06-08 10:58 -0700
Message-ID<c578d54d-bffa-44f5-b5ec-2a2e0878d8b2@googlegroups.com>
In reply to#47391
At the Terminal prompt type: python -c "help('modules')"

If Pygame is not somewhere in the output then Pygame is not yet installed.

If it is not installed then type: pip install --upgrade pygame 

[toc] | [prev] | [next] | [standalone]


#47397

FromEam onn <letsplaysforu@gmail.com>
Date2013-06-08 11:05 -0700
Message-ID<bf7eef65-25f6-4630-9a44-ebde3d192bc5@googlegroups.com>
In reply to#47395
On Saturday, June 8, 2013 6:58:53 PM UTC+1, ccl...@bluewin.ch wrote:
> At the Terminal prompt type: python -c "help('modules')"
> 
> 
> 
> If Pygame is not somewhere in the output then Pygame is not yet installed.
> 
> 
> 
> If it is not installed then type: pip install --upgrade pygame

python -c "help('modules')" made an error. pip install --upgrade pygame made an error too.

[toc] | [prev] | [next] | [standalone]


#47398

FromEam onn <letsplaysforu@gmail.com>
Date2013-06-08 11:07 -0700
Message-ID<0cbb0cd2-b3dc-44a8-a232-a6f797057f5d@googlegroups.com>
In reply to#47397
On Saturday, June 8, 2013 7:05:49 PM UTC+1, Eam onn wrote:
> On Saturday, June 8, 2013 6:58:53 PM UTC+1, ccl...@bluewin.ch wrote:
> 
> > At the Terminal prompt type: python -c "help('modules')"
> 
> > 
> 
> > 
> 
> > 
> 
> > If Pygame is not somewhere in the output then Pygame is not yet installed.
> 
> > 
> 
> > 
> 
> > 
> 
> > If it is not installed then type: pip install --upgrade pygame
> 
> 
> 
> python -c "help('modules')" made an error. pip install --upgrade pygame made an error too.

Wait, the python -c "help('modules')" worked after spamming it a few times. Pygame was listed but it won't do anything when I type in 'import pygame' I still get the error :(

[toc] | [prev] | [next] | [standalone]


#47402

FromFábio Santos <fabiosantosart@gmail.com>
Date2013-06-08 20:12 +0100
Message-ID<mailman.2893.1370718762.3114.python-list@python.org>
In reply to#47398

[Multipart message — attachments visible in raw view] — view raw

On 8 Jun 2013 19:19, "Eam onn" <letsplaysforu@gmail.com> wrote:
> Wait, the python -c "help('modules')" worked after spamming it a few
times. Pygame was listed but it won't do anything when I type in 'import
pygame' I still get the error :(

Try to always say what your error was.

Do you have pip installed? Pygame AFAIK is a c extension so it requires a
working compiler. I think you need to have one.

[toc] | [prev] | [next] | [standalone]


#47404

Fromcclauss@bluewin.ch
Date2013-06-08 12:23 -0700
Message-ID<e14b69e2-4d52-4ca5-8d7f-4f5b0d83f157@googlegroups.com>
In reply to#47398
Type: python -V
(That was a capitol V) What version of python is running?

Type: python3 -V
(That was a capitol V) What version of python is running?

Type: python -c 'import pygame'
What is the exact error message?

Type: python
Your prompt should change to something like: >>>
Type: import pygame
What is the exact error message?

[toc] | [prev] | [next] | [standalone]


#47401

FromDennis Lee Bieber <wlfraed@ix.netcom.com>
Date2013-06-08 15:10 -0400
Message-ID<mailman.2892.1370718621.3114.python-list@python.org>
In reply to#47397
On Sat, 8 Jun 2013 11:05:49 -0700 (PDT), Eam onn <letsplaysforu@gmail.com>
declaimed the following:

>On Saturday, June 8, 2013 6:58:53 PM UTC+1, ccl...@bluewin.ch wrote:
>> At the Terminal prompt type: python -c "help('modules')"
>> 
>> 
>> 
>> If Pygame is not somewhere in the output then Pygame is not yet installed.
>> 
>> 
>> 
>> If it is not installed then type: pip install --upgrade pygame
>
>python -c "help('modules')" made an error. pip install --upgrade pygame made an error too.

	And again, you didn't bother to copy the error message text into the
post.

	Off-hand, since you stated Mac OS at some point in time...

	The system Python tends, as I recall, to only want Apple sourced
libraries.

	You may want to figure out how to install an alternate Python (that is
NOT in the system PATH), set your user account path to find that version
first, and then install your add-on modules to that alternate Python.
<html>
<body>
<font face="Lucida Console">-- <br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>Wulfraed&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dennis Lee Bieber&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AF6VN<br>
&nbsp;&nbsp;&nbsp;   wlfraed@ix.netcom.com&nbsp;&nbsp;&nbsp; <a href="http://wlfraed.home.netcom.com/" eudora="autourl">HTTP://wlfraed.home.netcom.com/<br>
</a></font></body>
</html>

[toc] | [prev] | [next] | [standalone]


#47405

FromDennis Lee Bieber <wlfraed@ix.netcom.com>
Date2013-06-08 16:17 -0400
Message-ID<mailman.2895.1370722638.3114.python-list@python.org>
In reply to#47397
On Sat, 08 Jun 2013 15:10:11 -0400, Dennis Lee Bieber
<wlfraed@ix.netcom.com> declaimed the following:


><html>
><body>
><font face="Lucida Console">-- <br>
><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>Wulfraed&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dennis Lee Bieber&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AF6VN<br>
>&nbsp;&nbsp;&nbsp;   wlfraed@ix.netcom.com&nbsp;&nbsp;&nbsp; <a href="http://wlfraed.home.netcom.com/" eudora="autourl">HTTP://wlfraed.home.netcom.com/<br>
></a></font></body>
></html>

	ACK! 

	Sorry about that; I'm configuring a new computer and apparently somehow
generated HTML signatures (shared with Eudora).

	Hopefully I've corrected that matter
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

[toc] | [prev] | [next] | [standalone]


#47418

FromNeil Hodgson <nhodgson@iinet.net.au>
Date2013-06-09 08:51 +1000
Message-ID<51B3B57C.4020208@iinet.net.au>
In reply to#47391
Eam onn:

> ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so, 2): no suitable image found.  Did find:
> 	/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so: no matching architecture in universal wrapper

    This is saying that the version of Python you are using is a 
different architecture to the installed pygame library. This could be 
because you are using a 64-bit version of Python with a 32-bit library 
or vice-versa. Or you have a PowerPC library and Python is compiled for 
Intel processors.

    In Terminal, you can find the architecture of files with "otool -vh" 
followed by the file name. So try (on one line)

otool -vh 
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygame/base.so

    And the same with Python, first finding where Python is with
whereis python

    Then post all of the output text, not just your interpretation.

    Neil

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web