Mac installation python3 permission problem

Installed python3 on the computer today, everything was normal, and finally appeared

Error: An unexpected error occurred during the `brew link` step
The formula built, but is not symlinked into /usr/local
Permission denied @ dir_s_mkdir - /usr/local/Frameworks
Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks

 I've searched the internet and it's basically saying

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

 

This is to change all the owner and group in the /usr/local directory. It is also recommended to use

sudo chown -R (whoami)(brew –prefix)/* 

 

But the method I finally used is to manually create a Frameworks directory in the /usr directory, then change the owner and group and the current user and group, and finally execute

brew link python3

 

The installation is complete

 

 

---I am the dividing line---

But after the installation is completed, pip3 will not be installed successfully, probably because only python3 is linked at the end

So the last step is to use brew install python3 to reinstall python3, so that pip3 will come with it after the installation is successful.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326301450&siteId=291194637