美文网首页
mac下python2升级到python3

mac下python2升级到python3

作者: praycis | 来源:发表于2018-02-28 11:24 被阅读0次

    1.下载python最新版本

    🔗链接:https://www.python.org/downloads/mac-osx/

    安装默认位置为: /Library/Frameworks/Python.framework/Versions/3.5/

    2.打开终端,修改~/.bash_profile文件

    # Setting PATH for Python 3.6
    # The original version is saved in .bash_profile.pysave
    PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}"
    export PATH
    
    alias python="/Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6"
    

    3.重启终端或执行

    source ~/.bash_profile

    相关文章

      网友评论

          本文标题:mac下python2升级到python3

          本文链接:https://www.haomeiwen.com/subject/vvjbxftx.html