I try to upgrade python2.7 to python3 on macOS Catalina, when I run brew doctor
, it shows:
Warning: 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"' >> ~/.zshrc
So I try the command echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc
which did not works.
Apple macOS has moved from Bash shell to Zsh (Z Shell).
Solution:
Run the command below in your terminal:
echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc
Now quit the terminal by pressing command+q
, re-open the terminal and run brew doctor
You need to close and re-open your terminar after applying:
echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.zshrc
After some search I found the commands that works for me:
export PATH="/usr/local/bin:$PATH"
source ~/.bash_profile
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With