Python – How to Fix Permissions on Home-brew on MacOS High Sierra

bashhomebrewpython

When I tried to install python onto homebrew it downloaded it and then an error message popped up at the end that stopped it from completing. When I try to do it again it asks me to do:

$ brew link python

After entering that the same error message appears:

permission denied @ dir_s_mkdir - /usr/local/lib

I have tried to do:

$ sudo chown -R $(whoami) /usr/local

And I get an error message that reads:

chown: /usr/local: Operation not permitted

Best Answer

sudo mkdir /usr/local/Frameworks
sudo chown $(whoami):admin /usr/local/Frameworks    
brew link python3