gpt4 book ai didi

python - Mac 上缺少(?)Python 2.7 框架

转载 作者:太空宇宙 更新时间:2023-11-04 08:20:18 31 4
gpt4 key购买 nike

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

虽然我从来没有考虑太多,但我认为前者是针对用户提供的框架,后者是针对系统补丁提供的“官方”框架。

关于python - Mac 上缺少(?)Python 2.7 框架,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6410091/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com