pip – How do I use Conda in on Homebrew Python system?
I may be wrong but it sounds like the op is trying to figure out how to make a virtual environment for anaconda without overriding all their existing python stuff. At least that is what I was trying to do which led me here. I managed to find a rather inelegant solution that you can use if you really must have anaconda in its own env:
As devssh says, you can do a brew cask install anaconda
but dont add the directory to your path, or it will override your python 2.7 and cause much sadness. Instead create a virtual environment like such (Im using virtual environment wrapper):
mkvirtualenv -p /usr/local/anaconda3/bin/python anaconda_env
now move all the stuff from anaconda bin into your virtualenv bin:
cp /usr/local/anaconda3/bin/* /Users/<you>/.virtualenvs/anaconda_env/bin/
This last is necessary because the anaconda dependencies were not installed with the environments pip so it doesnt know where to look for them.
Read more here: Source link