How to link home brew python version and set it as default

后端 未结 10 605
春和景丽
春和景丽 2020-12-07 15:57

I just switched from MacPorts to HomeBrew. After installing all the required XCode versions and other software I tried installing python using homebrew: I think it successfu

相关标签:
10条回答
  • 2020-12-07 16:22

    I use these commands to solve it.

    mkdir /usr/local/lib
    mkdir /usr/local/lib/pkgconfig
    brew link python
    
    0 讨论(0)
  • 2020-12-07 16:27

    You can follow these steps.

    $ python3 --version  
    $ brew unlink python@2
    $ brew link python3   
    $ python3 --version   
    

    0 讨论(0)
  • 2020-12-07 16:29

    This answer is for upgrading Python 2.7.10 to Python 2.7.11 on Mac OS X El Capitan . On Terminal type:

    brew unlink python
    

    After that type on Terminal

    brew install python
    
    0 讨论(0)
  • 2020-12-07 16:30

    brew switch to python3 by default, so if you want to still set python2 as default bin python, running:

    brew unlink python && brew link python2 --force
    
    0 讨论(0)
提交回复
热议问题