I’ve always use the Homebrew to install the dependencies needed. For recent studies, I need Anaconda for learning python developments. So the first step is trying to install it with homebrew, but get this information:
Cask anaconda installs files under /usr/local. The presence of such files can cause warnings when running "brew doctor", which is considered to be a bug in Homebrew-Cask.
To fix this bug, you need to add the
/usr/local/anaconda3/bin directory to the PATH environment variable. Simply put this in terminal:
echo export PATH="/usr/local/bin:$PATH" >> ~/.bash_profile
However, I don’t even maintain a
.bash_profile on my computer. So I wonder there is another better solution for me. Eventually, there it is!
Just open your
/etc/paths file with your favourite editor using
sudo permissions, and add
/usr/local/anaconda3/bin to it:
sudo nano /etc/paths /usr/local/bin /usr/bin /bin /usr/sbin /sbin /usr/local/anaconda3/bin
and then RESTART THE TERMINAL. Now you can check the python3 is installed with Anaconda as
Python 3.6.4 :: Anaconda, Inc..