Mac OS X El Capitan or later Install and update Xcode and Homebrew
(In the first place, you need to be careful when two or more package management systems coexist.)
Download and install Anaconda.
If you check .bash_profile
#added by Anaconda3 4.0.0 installer
export PATH="/Users/*User name*/anaconda/bin:$PATH"
At this rate, Homebrew and Anaconda environments will be batting, so comment them out.
#export PATH="/Users/*User name*/anaconda/bin:$PATH"
Then add the following function to ~ / .bashrc
.
#!/usr/local/bin/bash
function enter_conda()
{
source /Users/*User name*/anaconda/bin/activate root
}
function quit_conda()
{
source /Users/*User name*/anaconda/bin/deactivate
}
After that, Python managed by Anaconda can be used in root mode by executing ʻenter_conda (). Exit root mode with
quit_conda ()`.
Now Anaconda will not interfere with Homebrew and Homebrew will not interfere with Anaconda.