I\'m using Homebrew as my package general manager, and am using its Python and pip for software development, along with virtualenvs. For various reasons, I\'d like to continue w
You can install Anaconda. Try brew cask install anaconda
. Follow the on-screen instructions you may want to add export PATH=/usr/local/anaconda3/bin:"$PATH"
to your ~/.bash_profile or ~/.zsh file.
Using anaconda you can create virtual environments for python2 and python3. You can set up environments and then use commands like source activate py27
assuming py27
is an environment you created in python2.7 in anaconda. It even has GUI and CLI versions.
Every time I open my terminal, my .bash_profile and .zshrc get sourced. If you append the source
line above, it will load with the version you need everytime. Every anaconda environment has its own pip as well.
With Anaconda in the mix, you'd not really need virtualenv anymore but you can keep it if you want.
If you want to run the Anaconda Navigator
GUI you can run it: open /usr/local/anaconda3/Anaconda-Navigator.app
. You can use it to manage/create the environments and pip packages, etc.