mac安装python3

brew install python3

安装中报错:
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

image.png

问题是文件夹不存在,解决办法创建文件夹,并给权限

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

然后执行

brew link python3

安装成功, 检查


image.png

安装后没有pip3命令。重新安装后好了

brew reinstall python3

你可能感兴趣的:(mac安装python3)