I'm learning Python and most tutorials recommend to install Python using homebrew so I installed homebrew then I typed:

brew install python

which should overwrite OS X Python 2.7.10 with 2.7.11 but I think it didn't and when I enter:

brew doctor

I get:

Homebrew's sbin was not found in your PATH but you have installed formulae that put executables in /usr/local/sbin. Consider setting the PATH for example like so echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.bash_profile

What should I do? Should I uninstall everything and start over?


It might be unrelated to the problem with Python, but at this moment, you should do exactly what the message says, i.e. type the following command:

echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.bash_profile

After that reopen terminal session or run . ~/.bash_profile command.

It just says that some of the programs you installed with homebrew are placed in /usr/local/sbin directory, but your shell "does not know" about them.

For a reference you can check which programs (formulae) are there by listing the contents:

ls /usr/local/sbin

As for checking Python, type:

ls -l `which python`

It will give you the path to the current executable. You want it the output to look this way:

lrwxrwxr-x  1 root  admin  34 Dec 14 21:12 /usr/local/bin/python@ -> ../Cellar/python/2.7.11/bin/python
  • the export command didn't work, brew doctor show same message even after restarting terminal session – Steven Mar 11 '16 at 12:14
  • entered export PATH="/usr/local/sbin:$PATH"' >> ~/.bash_profile and hit enter – Steven Mar 11 '16 at 12:18
  • i entered brew doctor to check after i reopened the terminal and it shows the same message – Steven Mar 11 '16 at 12:39
  • '/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin' – Steven Mar 11 '16 at 13:15
  • it shows nothing..i opened it with texteditor and it was empty – Steven Mar 11 '16 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.