Fixing homebrew path
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
Related videos on Youtube
Steven
Updated on September 18, 2022Comments
-
Steven over 1 year
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?
-
Steven about 8 yearsthe export command didn't work, brew doctor show same message even after restarting terminal session
-
Steven about 8 yearsentered export PATH="/usr/local/sbin:$PATH"' >> ~/.bash_profile and hit enter
-
Steven about 8 yearsi entered brew doctor to check after i reopened the terminal and it shows the same message
-
Steven about 8 years'/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin'
-
Steven about 8 yearsit shows nothing..i opened it with texteditor and it was empty
-
Steven about 8 years.bash_profile now contains
export PATH="/usr/local/sbin:$PATH"
, wrong? -
Steven about 8 yearsthanks it worked, but should't the .bash_profile contain only the path not
export PATH =
? -
techraf about 8 yearsit doesn't hurt