Fixing Library Path In Setupext.py For Mac

After updating to Lion a few months ago, I noticed that any Python-based apps/tools stopped working. After some research, I solved the problem by re-installing the official Python installer, and correcting my PATH variable. Now though, I'm not so sure everything is working the way it should, because when I try to use Sublime Text 2, I get an error report dialog with.

  1. Fixing Library Path In Setupext.py For Mac Os X
LibraryFixing library path in setupext.py for mac free

Fixing Library Path In Setupext.py For Mac Os X

Dyld Error Message: Library not loaded: /System/Library/Frameworks/Python.framework/Versions/2.6/Python Referenced from: /Applications/Sublime Text 2.app/Contents/MacOS/Sublime Text 2 Reason: image not found. Upon inspection, my /System/Library/Frameworks/Python.framework/Versions/2.6 folder contains: 2.6/ Extras/ Headers/ -(symlink)- include include/ lib/ Not Python like expected. Curious, I did a little digging, and find that I have /Library/Frameworks/Python.framework /System/Library/Frameworks/Python.framework /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Python.framework /Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/Python.framework /Developer-3.2.6/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Python.framework /Developer-3.2.6/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/Python.framework Along with several application-specific distributions, but I'm not concerned about those. Am I supposed to have Python frameworks in both /Library/Frameworks and /System/Library/Frameworks?

What's the difference between the two? At this point, I feel like things would just be cleaner to start from scratch with Python, but how can I do that without screwing up my existing tools/apps? Would I need to delete my Python frameworks? Should I use the official installer, or perhaps homebrew's python package? I think the standard python, that comes with Lion, is python 2.7.

Your best chance to get the default setup is probably to copy the relevant files from a different Lion install on a friends machine. I took a quick look at my Lion System and this is how my pyhton install looks like: ls -lah /System/Library/Frameworks/Python.framework/Versions/2.7/ total 2296 drwxr-xr-x 11 root wheel 374B Aug 18 15:22. Drwxr-xr-x 7 root wheel 238B Jul 11 2011. Drwxr-xr-x 6 root wheel 204B Jul 11 2011 Extras lrwxr-xr-x 1 root wheel 17B Aug 18 15:20 Headers - include/python2.7 drwxr-xr-x 3 root wheel 102B Jun 17 2011 Mac -rwxr-xr-x 1 root wheel 2.7M Jul 11 2011 Python drwxr-xr-x 7 root wheel 238B Jul 11 2011 Resources drwxr-xr-x 3 root wheel 102B Jun 17 2011 CodeSignature drwxr-xr-x 17 root wheel 578B Jul 11 2011 bin drwxr-xr-x 3 root wheel 102B Jun 17 2011 include drwxr-xr-x 5 root wheel 170B Jul 11 2011 lib And: ls -lah /System/Library/Frameworks/Python.framework/Versions/2.7/lib/ total 8 drwxr-xr-x 5 root wheel 170B Jul 11 2011. Drwxr-xr-x 11 root wheel 374B Aug 18 15:22. Lrwxr-xr-x 1 root wheel 9B Jul 11 2011 libpython2.7.dylib -./Python drwxr-xr-x 4 root wheel 136B Jul 11 2011 pkgconfig drwxr-xr-x 643 root wheel 21K Oct 14 08:46 python2.7 And /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ contains all the stuff in the python standard lib like for example: total 13672 drwxr-xr-x 643 root wheel 21K Oct 14 08:46. Drwxr-xr-x 5 root wheel 170B Jul 11 2011.rw-r-r- 1 root wheel 22K Jun 17 2011 BaseHTTPServer.py -rw-r-r- 1 root wheel 22K Jul 11 2011 BaseHTTPServer.pyc -rw-r-r- 1 root wheel 22K Jul 11 2011 BaseHTTPServer.pyo -rw-r-r- 1 root wheel 5.6K Jun 17 2011 Bastion.py -rw-r-r- 1 root wheel 7.2K Jul 11 2011 Bastion.pyc -rw-r-r- 1 root wheel 7.2K Jul 11 2011 Bastion.pyo -rw-r-r- 1 root wheel 13K Jun 17 2011 CGIHTTPServer.py -rw-r-r- 1 root wheel 11K Jul 11 2011 CGIHTTPServer.pyc -rw-r-r- 1 root wheel 11K Jul 11 2011 CGIHTTPServer.pyo -rw-r-r- 1 root wheel 26K Jun 17 2011 ConfigParser.py.