On 09/12/2007, at 12:30 PM, Alex Holkner wrote:
> > On Dec 9, 2007 12:21 PM, Shu Ning Bian <[EMAIL PROTECTED]> wrote: >> >> For this beta release I decided to scrap my tiger python install and >> use the leopard python. So I rm -rf'd /Library/Frameworks/ >> Python.framework, modified my path so I am using /usr/bin/python, >> then >> did a pyglet install using the .dmg. Pyglet correctly installed >> into / >> System/Library/Frameworks/Python.framework/Versions/Current/lib/ >> python2.5/site-packages/pyglet but when I try to import any of the >> pyglet modules I get a module not found. >> >> A close inspection of python paths reveal that site-packages for >> leopard python is in /Library/Python/2.5/site-packages . I did the >> following: > > I presume you mean /Library/Frameworks/Python.framework/..., not > /Library/Python/... No, I do mean /Library/Python: [EMAIL PROTECTED]:/$ ls /Library/Python/2.5/site-packages/ PIL PIL.pth README pyglet pyglet-1.0beta3-py2.5.egg-info [EMAIL PROTECTED]:/$ [EMAIL PROTECTED]:~$ ls /Library/Frameworks/Python.framework/ gls: cannot access /Library/Frameworks/Python.framework/: No such file or directory [EMAIL PROTECTED]:~$ Note that I moved pyglet into /Library/Python/2.5/site-packages/ from / System/Library/Frameworks/Python.framework/Versions/Current/lib/ python2.5/site-packages/pyglet in order for my system python to see it. > > >> >> ln -s /System/Library/Frameworks/Python.framework/Versions/Current/ >> lib/python2.5/site-packages/pyglet ./ >> >> in /Library/Python/2.5/site-packages and it solved the problem. > > But you said you deleted this directory? Not quite, I deleted /Library/Framework/Python.framework - I had presumed this was sufficient to remove any previous macpython installation - perhaps I am mistaken? > > >> Perhaps the installed needs 1 more tweak? > > I am quite sure that /System/Library/Frameworks/Python.framework is > the Leopard Python, and /Library/Frameworks/Python.framework is the > python.org Python. It's possible that your /usr/bin/python is not the > Leopard Python binary (or symlink). > [EMAIL PROTECTED]:~$ ls -l `which python` lrwxr-xr-x 1 root wheel 72 Nov 11 23:23 /usr/bin/python -> ../../ System/Library/Frameworks/Python.framework/Versions/2.5/bin/python [EMAIL PROTECTED]:~$ It would appear the site-package for system python under leopard is in /Library/Python/2.5/site-packages. When I installed PIL from source using system python that is where the PIL package ended up as well. Moving pyglet into /Library/Python/2.5/site-packages allows the system python to "see it". Here is a dump of my sys.path if that helps: Python 2.5.1 (r251:54863, Oct 5 2007, 21:08:09) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> print sys.path ['', '/System/Library/Frameworks/Python.framework/Versions/2.5/lib/ python25.zip', '/System/Library/Frameworks/Python.framework/Versions/ 2.5/lib/python2.5', '/System/Library/Frameworks/Python.framework/ Versions/2.5/lib/python2.5/plat-darwin', '/System/Library/Frameworks/ Python.framework/Versions/2.5/lib/python2.5/plat-mac', '/System/ Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/plat- mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/ Versions/2.5/Extras/lib/python', '/System/Library/Frameworks/ Python.framework/Versions/2.5/lib/python2.5/lib-tk', '/System/Library/ Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload', '/ Library/Python/2.5/site-packages', '/Library/Python/2.5/site-packages/ PIL', '/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/ lib/python/PyObjC'] >>> Cheers, Steve > Alex. > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en -~----------~----~----~----~------~----~------~--~---
