Installing python on leopard

I admit I am completely disabled by installing python. Can someone help me on how to install the module.

I want to play with PyGame, PyOpenGL, etc. So I install them, but every time I type the "import pygame" error message appears.

here is my environment so far.

In .bash_profile

PATH=${PATH}:/System/Library/Frameworks/Python.framework/Versions/Current/bin

      

Using easy_install PyOpenGL put this

/Library/Python/2.5/site-packages/PyOpenGL-3.0.0b8-py2.5.egg

      

Find pygame module

dchong:~ danielchong$ locate pygame
/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/py2app/recipes/pygame.py
/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/py2app/recipes/pygame.pyc

dchong:~ danielchong$ locate pyopengl
/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/py2app/recipes/pyopengl.py
/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/py2app/recipes/pyopengl.pyc

      

when i run python

Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17) 
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygame
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named pygame

      

+1


source to share


2 answers


I'm not a big fan of installing python by default on OS X, primarily, mainly because it's usually a pretty old version. I find everything works better if I use the macports package.

easy_install seems to work better with the macports package, but perhaps that's simply because I'm too lazy to figure out the nuances of the default installation.



From what I can see there, it looks like the package path is not set correctly. Are you sure you are using the correct package site directory?

+1


source


See http://farmdev.com/thoughts/66/python-3-0-on-mac-os-x-alongside-2-6-2-5-etc-/



0


source







All Articles