美文网首页
MAC 下同时使用Python 3.7和3.6

MAC 下同时使用Python 3.7和3.6

作者: 烟雨醉尘缘 | 来源:发表于2018-12-30 21:56 被阅读0次

    参考文档:https://stackoverflow.com/questions/51726203/installing-python3-6-alongside-python3-7-on-mac/51727268

    emmmmm 当然可以使用docker和virtualenv来实现多种python版本。

    这个骚操作是我从stackoverflow中看到的,忽然发现很适合我这种懒人。

    Try using brew for example if already using Python 3:

    $ brew unlink python
    

    Then install python 3.6.5:

    $ brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/f2a764ef944b1080be64bd88dca9a1d80130c558/Formula/python.rb
    

    To get back to python 3.7.0 use:

    $ brew switch python 3.7.0
    

    And if need 3.6 again switch with:

    $ brew switch python 3.6.5_1
    

    相关文章

      网友评论

          本文标题:MAC 下同时使用Python 3.7和3.6

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