I've been wondering why python gets installed in directory named Frameworks? (though it's not Framework)
$ which pyth开发者_高级运维on
/Library/Frameworks/Python.framework/Versions/2.7/bin/python
Somebody please explain! Thanks!
That's the way it is in OS X.
The Mac/README file in the Python source tree goes into some more details of the advantages of a framework build versus a traditional UNIX shared-library build, which will also work on OS X. The main points:
"The main reason is because you want to create GUI programs in Python. With the exception of X11/XDarwin-based GUI toolkits all GUI programs need to be run from a fullblown MacOSX application (a ".app" bundle).
While it is technically possible to create a .app without using frameworks you will have to do the work yourself if you really want this.
A second reason for using frameworks is that they put Python-related items in only two places: "/Library/Framework/Python.framework" and "/Applications/MacPython 2.6". This simplifies matters for users installing Python from a binary distribution if they want to get rid of it again. Moreover, due to the way frameworks work a user without admin privileges can install a binary distribution in his or her home directory without recompilation."
精彩评论