现在的位置: 首页 > 综合 > 正文

升级 Mac 的 Ptyhon 到 3.3 版本

2012年08月06日 ⁄ 综合 ⁄ 共 794字 ⁄ 字号 评论关闭

1、下载安装程序:http://python.org/download/,Python 3.3.2 Mac OS X 64-bit/32-bit x86-64/i386 Installer

2、安装

3、以超级用户执行如下脚本:

#!/bin/bash
rm -R /System/Library/Frameworks/Python.framework/Versions/3.3
mv /Library/Frameworks/Python.framework/Versions/3.3 /System/Library/Frameworks/Python.framework/Versions
chown -R root:wheel /System/Library/Frameworks/Python.framework/Versions/3.3
 
rm /System/Library/Frameworks/Python.framework/Versions/Current
ln -s /System/Library/Frameworks/Python.framework/Versions/3.3 /System/Library/Frameworks/Python.framework/Versions/Current
 
rm /usr/bin/pydoc
rm /usr/bin/python
rm /usr/bin/pythonw
rm /usr/bin/python-config
 
rm /System/Library/Frameworks/Python.framework/Versions/3.3/bin/pydoc
rm /System/Library/Frameworks/Python.framework/Versions/3.3/bin/python
rm /System/Library/Frameworks/Python.framework

抱歉!评论已关闭.