系统升级Python到3.3失败!!

Goagent 3.0版本,需要系统有Python3.3版本的支持。
直接下载,
然后没有犹豫的 通过终端,参照下面这篇升级2.7.3的文章步骤操作下去
一路删除了系统自带的Python 2.7默认版本。
替换进了3.3版本,

第一步, 下载最新的Python版本

下载的地址就在http://python.org, 最新的版本是Python 2.7.3 Mac OS X 64-bit/32-bit x86-64/i386 Installer (for Mac OS X 10.6 and 10.7),大约是18.8Mb。DMG的格式,下载完成,双击即可安装,不需要任何设置,默认的安装路径是 /Library/Frameworks/Python.framework,不过这和系统原有的路径不一样。因为系统之前是存在Python的,所以安装成功后,在Terminal里运行Python,看到的依旧是2.7.2的版本号。接下来,我们要做的就是把原来的系统版本移除,让新的版本正常工作。

第二步, 把Python挪到正确的位置去

我印象里至少在Mac OSX 10.7以后都自带Python的,所以我们假设你的系统是自带Python,现在要删除Ta

sudo rm -R /System/Library/Frameworks/Python.framework/Versions/2.7

把第一步里安装好的Python目录移到原本系统所持有的目录位置。

sudo mv /Library/Frameworks/Python.framework/Versions/2.7 /System/Library/Frameworks/Python.framework/Versions

第三步,修改文件所属的Group

设置Group为wheel,原来系统自带的就是这样的。

sudo chown -R root:wheel /System/Library/Frameworks/Python.framework/Versions/2.7

第四步,更新一下Current的Link

在Versions的目录里有一个Current的link,是指向当前的Python版本,原始是指向系统自带的Python2.7.2,我们把它删除后,link就失效了,所以需要重新链一下

sudo rm /System/Library/Frameworks/Python.framework/Versions/Current
sudo ln -s /System/Library/Frameworks/Python.framework/Versions/2.7 /System/Library/Frameworks/Python.framework/Versions/Current
第五步,重新链接可执行文件

1) 先把系统原来的执行文件删掉

sudo rm /usr/bin/pydoc
sudo rm /usr/bin/python
sudo rm /usr/bin/pythonw
sudo rm /usr/bin/python-config

2) 建立新的链接

sudo ln -s /System/Library/Frameworks/Python.framework/Versions/2.7/bin/pydoc /usr/bin/pydoc
sudo ln -s /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python /usr/bin/python
sudo ln -s /System/Library/Frameworks/Python.framework/Versions/2.7/bin/pythonw /usr/bin/pythonw
sudo ln -s /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python-config /usr/bin/python-config

最后,更新一下.bash_profile文件

cd ~
vim .bash_profile (只要能编辑就行)
插入新的Python路径

# Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
PATH="/System/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH

大功告成!
重新开启一个Terminal,然后运行 Python -V,看看出现的是不是”Python 2.7.3″。

可惜悲剧了。。。3.3无法启动。

记录,以待解决。

 

13-05-30更新:
解决方法:
找同版本的Mac的电脑拷贝了一份被删除的Python2.7默认文件夹。
然后按照当时的操作步骤逆向操作了一遍
由于当时升级3.3时,修改了.bash_profile,添加了PATH。
所以导致所有命令无法找到,
只能在文件夹中,修改.bash_profile文件(隐藏状态)。

现在直接Terminal中执行goagent或者wallproxy的 .py文件都可以顺利正常。
但是使用goagentmac却无法运行。始终显示的状态是 “GoAgent Starting….”

评论

《 “系统升级Python到3.3失败!!” 》 有 7 条评论

  1. Danielder 的头像
    Danielder

    Water Damage Mitigation Service targets upon aiding property owners promptly managing aqua-associated problems.
    This key goal becomes for cease extra detriment, save redeemable belongings, and restore security upon this house.
    Such support remain typically required after events for example plumbing bursts, torrential precipitation, deluge, typhoons, plus different natural events which let aqua within seep domestic areas.
    Envision a situation during which the pipe bursts plus heavy heavy rain engulfs an building, damaging partitions, wetting upholstery, moreover capable of fostering infestation when ignored.
    Fast intervention is essential for reduce harms plus control escalating restoration charges. About what manners do us assist?
    Professional crew reach rapidly to extract excess wetness, totally air out impacted impacted zones, moreover defend home property preventing infestation formation plus additional degradation.
    Essentially, the process stabilizes such house and ensures home’s safety post that episode . Our help avoids thorough repair nevertheless establishes such stage to subsequent restorations as it mitigating more intense troubles down this path.
    Get our help right now – 8338561951

  2. Danielder 的头像
    Danielder

    Water Damage Mitigation Service targets upon facilitating inhabitants promptly dealing with water-linked matters.
    Service’s key aim serves as to stop extra injury, maintain recoverable possessions, plus reinstate protection for an home.
    Comparable assistance become commonly needed subsequent to occurrences including plumbing leaks, heavy downpour, overflow, tempests, as well as different geological phenomena that enable aqua within penetrate living areas.
    Picture one situation during which a pipe ruptures or heavy downpour engulfs an dwelling, damaging walls, soaking fabrics, moreover likely promoting spores if unaddressed.
    Quick action remains critical concerning limit impacts and restrain escalating reconstruction bills. Concerning the approaches does our team assist?
    Our technicians arrive promptly intended to eliminate excess water, fully desiccate those affected spots, plus guard such dwelling opposing infestation proliferation plus further disintegration.
    In essence, our intervention fortifies dwelling dwelling furthermore ensures their occupancy after an occurrence . Such assistance omits complete restoration though builds a basis for following restorations meanwhile avoiding increased serious troubles down such horizon.
    Get our help right now – 8338561951

  3. SheilaMut 的头像
    SheilaMut

    KongKasino, og ble positivt overrasket. Du får en stor velkomstpakke + gratisspinn nesten med en gang du har registrert deg via BankID.

    Det jeg likte mest var:
    – Trygghet og tydelige regler
    – Varierte spill og gode gevinster
    – Cashback og gratisspinn uten tull
    – Rask kundeservice – på norsk

    Anbefales for de som ønsker en trygg casino-opplevelse.
    Verdt å sjekke ut!

    Offisielt og lisensiert

    openrec.tv

  4. Ronaldspuro 的头像
    Ronaldspuro

    valuable home fixes that worked well alongside this write-up, making my home projects efforts more productive. it feels reassuring to know that even without special training, one can gradually build the skills needed to keep a home in better shape. what i appreciate most is the encouragement to stay proactive, because prevention is always easier than dealing with bigger issues later. This time I stayed and thought it adds value to the overall topic. — In longer discussions I usually skip, but what i especially appreciate information that focuses on achievable residence repair goals rather than overwhelming projects. this post motivates readers to start small and build confidence. i recently discovered some —

  5. swyswy 的头像

    我也有这样的问题 但我重新再网上下了2.7可以吗?逆向操作是指把上述所有code里的3.3换成2.7吗

    1. Ray 的头像

      好像是的,把代码再敲一遍,3.3改成2.7。太久了具体的也忘记了。

回复 Danielder 取消回复

您的邮箱地址不会被公开。 必填项已用 * 标注

最新文章

Tags Cloud

blender Blizzard CentOS6.3 Dream Evernote笔记同步 Game goagent Google Hellboy漫画系列 HTML5 Linux lnmp Maya Movies nginx php reproduce SATA mode scp SSH storyboard The Simpsons to-page wordpress 动画 大三 定格动画 挂科 星际争霸2 暗黑破坏神3 每日一Bia 毕业设计 漫画 漫画日记 电视剧分镜 眼高手低 美国恐怖故事 考试 自信 色彩Color 辛普森一家 远程桌面 速写 那时我年幼 阿里云

黑历史

ADs