我已经在Mac上安装了Python 2.7(32位)版本,并且安装成功(根据安装程序),但是当我尝试在System / Library / Frameworks / Python.framework / Versions中找到该版本时,最高2.6。从终端,但是,我得到:
Python 2.7.1 (r271:86882M, Nov 30 2010, 09:39:13)
[GCC 4.0.1 (Apple Inc. build 5494)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg', '/usr/local/lib/wxPython-unicode-2.8.12.0/lib/python2.7/site-packages', '/usr/local/lib/wxPython-unicode-2.8.12.0/lib/python2.7/site-packages/wx-2.8-mac-unicode', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages', '/usr/local/lib/wxPython-unicode-2.8.12.0/lib/python2.7']
谢谢您对这种情况的任何解释。
如您所见,它已安装在/ Library / Frameworks中,而不是/ System / Library / Frameworks中。尽管我从未考虑过太多,但我认为前者用于用户提供的框架,而后者用于系统补丁程序提供的“正式”框架。
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。