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

后端 未结 10 641
春和景丽
春和景丽 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:06

    On OS X High Sierra, I had to do this:

    sudo install -d -o $(whoami) -g admin /usr/local/Frameworks
    brew uninstall --ignore-dependencies python
    brew install python
    python --version # should work, returns 2.7, which is a Python thing (it's weird, but ok)
    

    credit to https://gist.github.com/irazasyed/7732946#gistcomment-2235469

    I think it's better than recursively chowning the /usr/local dir, but that may solve other problems ;)

提交回复
热议问题