开发者社区> 问答> 正文

Mac上缺少(?)Python 2.7框架

我已经在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']

谢谢您对这种情况的任何解释。

展开
收起
祖安文状元 2020-02-23 16:38:14 5658 0
1 条回答
写回答
取消 提交回答
  • 如您所见,它已安装在/ Library / Frameworks中,而不是/ System / Library / Frameworks中。尽管我从未考虑过太多,但我认为前者用于用户提供的框架,而后者用于系统补丁程序提供的“正式”框架。

    2020-02-23 16:38:21
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
From Python Scikit-Learn to Sc 立即下载
Data Pre-Processing in Python: 立即下载
双剑合璧-Python和大数据计算平台的结合 立即下载