Homebrew-core: Cannot link python3 in MacOS High Sierra

Created on 23 Nov 2017  路  3Comments  路  Source: Homebrew/homebrew-core

To help us debug your issue please explain:

  • What you were trying to do (and why)
    I tried to install python3 on MacOS High Sierra. The only installed python version is the default 2.7 release. After successfully running brew install python3 I set it as the default python environment with brew link python3.
  • What happened (include command output)
    This resulted in

Linking /usr/local/Cellar/python3/3.6.3... Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks

  • What you expected to happen
    I expect it to set python3 as the standard python interpreter and use it, when I use $ python in the terminal

  • Step-by-step reproduction instructions (by running brew install commands)

brew install python3
brew link python3

Using the --overwrite flag in brew link makes no difference.

Issue is the same as https://github.com/Homebrew/brew/issues/3308 (closed for formal errors)

Most helpful comment

sudo mkdir -p /usr/local/Frameworks
sudo chown -R $(whoami) /usr/local/*
brew link python3

And the command is python3 not python.

All 3 comments

sudo mkdir -p /usr/local/Frameworks
sudo chown -R $(whoami) /usr/local/*
brew link python3

And the command is python3 not python.

I'm having trouble understanding why this is closed. Homebrew is supposed to be able to install packages without needing root permissions, right? Why is the accepted solution to sudo make a directory? Doesn't this indicate a fundamental install bug with the package or Homebrew?

@AndrewRayCode no. install makes the directory https://github.com/Homebrew/install/blob/master/install#L206

This is a product of old installs or OS upgrades.

Was this page helpful?
0 / 5 - 0 ratings