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

Re: [pygame] Pygame on OS X 10.4 Tiger




Thanks Troels and Jack

I've tried both of your suggestions and they work if I paste the line into the
terminal and then start Python. Python 2.4.1 starts !

However, if I paste the line into the .bashrc it doesn't do the job.
It starts old python.

Well, .bashrc probably works too... I don't know if there's any
particular reason to use one or the other, but hey.  Anyway, the
problem is that /usr/local/bin needs to be BEFORE the rest  (and also
the first line in there is redundant).  I'd recommend you replace both
path-setting lines with this:

PATH=/usr/local/bin:/System/Library/Frameworks/Python.framework/Versions/2.3/bin:$PATH

That puts /usr/local/bin at the front of your path, so that when you
type "python", it will use the python 2.4 you've got in /usr/local/bin

Also, normally (in a .bash_profile file) the path-setting line would
start with "export ", but what you've got seems to work as well, and
I'm not enough of a bash expert to understand why it does (or if it
ever wouldn't)...


Did I hear someone say at some point that Python was a good language for
beginners?

: )


Yeah, well... Python is a good language for beginners, unfortunately I
think it's in a frustrating state for beginners on the Mac right now,
since the version that comes with Mac OS X is old, and when you
download the tools separately, some things are out of date and others
can be challenging for newbies to get installed and working correctly.
 All-in-all, getting started with python on the Mac is a very
non-Mac-like experience.  Hopefully some headway can be made on this
soon (though I don't know how, or by whom).

I agree, it's a great language. But the frustrations you have to go through to get
things to work !!! 

Even if I start 2.4.1 and try to run a pygame example, I get the following:
(and I just installed the latest PyObjC from the website)

Python 2.4.1 (#2, Mar 31 2005, 00:05:10)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
[1]+  Stopped                 python
thm-mac-pb:~ thm$ pythonw /Users/thm21/Desktop/pygame-1.7.1release/examples/aliens.py
Traceback (most recent call last):
  File "/Users/thm21/Desktop/pygame-1.7.1release/examples/aliens.py", line 6, in ?
    import pygame
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/pygame/__init__.py", line 37, in ?
    _check_darwin()
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/pygame/__init__.py", line 34, in _check_darwin
    raise ImportError("PyObjC 1.2 or later is required to use pygame on Mac OS X")
ImportError: PyObjC 1.2 or later is required to use pygame on Mac OS X
thm-mac-pb:~ thm$ 


Thanks again for all help. 
Thor