解決mac下brew link python3出錯brew Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks

mac上默認的python版本爲2.7.10版本,須要升級到python3 版本,經過brew升級

  • $brew install python3

提示錯誤

$ brew install python3 Warning: python3 3.6.3 is already installed, it's just not linked. You can use `brew link python3` to link this version. $ brew link python3 Linking /usr/local/Cellar/python3/3.6.3... Error: Permission denied @ dir_s_mkdirpython

發現/usr/local/下沒有路徑/usr/local/Frameworks
須要新建該路徑,並修改權限this

解決:code

$ sudo mkdir /usr/local/Frameworks $ sudo chown $(whoami):admin /usr/local/Frameworks
成功:it

$ brew link python3 Linking /usr/local/Cellar/python3/3.6.3... 1 symlinks createdio

相關文章
相關標籤/搜索