OSX Python系统框架意外覆盖
我超前地从 www.python.org/download/ 下载并安装了 OSX Python 2.6 软件包到我的 OSX 10.5.5 Intel Mac 上,并安装了完整的软件包内容。 只有在此之后我才遇到 http://wiki.python.org/moin/MacPython/Leopard 指出您应该对软件包进行部分安装以避免干扰系统安装。
恐怕我已经通过该安装程序覆盖了系统框架,并且我记得在发现这一点后我在某处读过,我会丢失 OSX 系统安装中包含的某些元素,而不是 Python 发行版。
有什么方法可以扭转这种情况或恢复我可能丢失的任何东西吗? 我究竟失去了什么?这会成为问题吗?
I got ahead of myself and downloaded and installed the OSX Python 2.6 package from www.python.org/download/ on my OSX 10.5.5 Intel Mac and installed the full package contents. Only after this did I come across http://wiki.python.org/moin/MacPython/Leopard stating that you should do a partial install of the package to avoid interfering with the system install.
I'm afraid I've already overwritten the system framework through that installer and I remember reading somewhere after discovering this that I'd lose certain elements included in the OSX system install and not Python distributions.
Is there any way to reverse this or restore anything I may have lost? What exactly have I lost and is it going to be a problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可能已经覆盖了系统框架,但更有可能的是您只是覆盖了
/usr/bin
中的符号链接以指向新版本。 尝试转到/usr/bin
并查看(使用诸如ls -alsh
之类的东西)python
符号链接指向的位置。 它可能是python2.6
或3.0
,这又是/System/Library/Frameworks/Python.framework/Versions ...
的ln code> 等。首先尝试将 python 符号链接重置为稳定或预期版本,即 sudo ln -s /usr/bin/python2.5 python (来自/usr/bin< /代码> 目录。)
You may have overwritten the system framework but it is more likely that you just overwrote the symlinks in
/usr/bin
to point to the new version. Try going to/usr/bin
and seeing (with something likels -alsh
) where thepython
symlink points to. It may bepython2.6
or3.0
, which is in turn a ln to/System/Library/Frameworks/Python.framework/Versions ...
etc. First try resetting the python symlink to the stable or expected version, ie,sudo ln -s /usr/bin/python2.5 python
(from the/usr/bin
dir.)我自己也遇到了同样的事情。 我确实发现 MacPython 安装程序修改了我的搜索 $PATH 并添加了“/Library/Frameworks/Python.framework/Versions/Current/bin”,这导致在“/usr/bin”中的可执行文件之前找到了那里的 python 可执行文件。
希望这对其他人有帮助!
I just ran into the same thing myself. I did find that the MacPython installer modified my search $PATH and added '/Library/Frameworks/Python.framework/Versions/Current/bin' which caused the python executable there to be found before the one in '/usr/bin'.
Hope this helps anyone else!
从最近的 Time Machine 备份或以某种方式从 DVD 恢复?
Restore from a recent Time Machine backup or somehow from DVD?